# Python代写 | COMP503 Fundamentals of Computer Programming

COMP503 Fundamentals of Computer Programming
Individual Assignment
(as an alternate assessment to Final Examination) *
Semester 1 2020
Late assignments will be penalized 5% per day (or part of the day) for four days and will receive a mark of zero after four days. Late assignments must be submitted via email.
This assessment is worth 50% of the total course marks.
Write a Python program that can perform and complete the following tasks:
(30 marks)
Write a python function, with name Kelv2Fehr() that will change the unit of a given temperature in Kelvin and convert it to Fahrenheit using the following conversion formula: (5 marks)
° F =1.8(K – 273) + 32
Use a while loop structure for temperature values between 250 K and 300 K and call Kelv2Fehr() to calculate and print out the corresponding Fahrenheit temperatures on the screen. (10 marks)
Use for loop structure to repeat the output of Task 2. (5 marks)
Explain the difference of for loop and while loop structures using the examples in Task 2 and Task 3. (5 marks)
Explain how functions in Python help to make programming easy. Use the function in Task 1 to justify this argument. (5 marks)

Write a Python program that can perform and complete the following tasks: (50 marks)
Generate File1.txt that contains n random integers between 0 and 50 where the number n is to be selected by the user. (You may use import random library in Python for this purpose) (10 marks)
Write a function with name File2List() that reads numbers from a file, converts them into integer, saves the numbers in a list and returns that list. (10 marks)
Write a function SortMyList() from scratch for sorting a list of numbers into descending order using selection sort algorithm. Your function must return the sorted list. (10 marks)
Use the function in Task2 to convert the numbers in File1.txt into list, name this list as MyList. (5 marks)
Use the function in Task 3 to sort the list created in task 4. Name this list as MyList2. (5 marks)
Use exceptions to handle at least one unexpected error in this code. (10 marks)

Note: For file handling, save the text file related to this assessment, on your desktop.

You must give a presentation as part of this assessment. You must present (but may not be limited to) the following tasks of this assessment, as given below: (20 marks)

Presentation Instructions:
Your presentation will consist of 10 minutes.
Your presentation will be followed by a question-answer (Q/A) session by the lecturer.
The Q/A session will consist of additional 3-5 minutes only.
The main slide of your talk must contain your details including the title of the talk, name of the presenter, student ID, Assessment and course details, date etc.
You must mention the slide number on each slide. For example, on the right bottom of your 5th slide, you should add ‘5/12’, in case there are twelve slides in total.
You should NOT present the whole code in your slides. However, you may explain the algorithm or technique or python tools you have used to complete the tasks.
The day and time slot of your presentation will be selected by the lecturer during online classes.
You may send a request email to saghira@ais.ac.nz for your presentation day and time-slot you want to select.
However, your request will be considered only if that time-slot is available.
You must record your presentation using Zoom app or Teams on your AIS-provided laptop.
You must submit your slides and the presentation recording, right after your presentation, through Moodle or via email.
Zero marks will be awarded if a student is unable to submit the recording as well as slides.
This presentation will be marked using the marking guide attached in the Appendix.

Appendix: Marking guide/criteria (Total marks: 40 to be scaled to 20 marks)
Student name: ___________________ Student ID: _____________

Content structure / ideas 2 – Excellent 1 – Good 1/2 – Fair 0 – Poor
Focus
Purpose of presentation is clear from the outset. Supporting ideas maintain clear focus on the topic. Topic of the presentation is clear. Content generally supports the purpose Presentation lacks clear direction. Big ideas not specifically identified. No focus at all. Audience cannot determine purpose of presentation.
Organization Student presents information in logical, interesting sequence that audience follows Student presents information in logical sequence that audience can follow Audience has difficulty following because student jumps around. Audience cannot understand because there is no sequence of information
Visual Aids
Visual aids are readable, clear and professional looking, enhancing the message. Visual aids are mostly readable, clear and professional looking. Significant problems with readability, clarity, professionalism of visual aids. Visual aids are all unreadable, unclear and/or unprofessional.