Home Page > > Details

Python，Files, Functions, Lists。

For this problem, you will create a grade analysis program in a file called a3p1.py. When this program runs, it should prompt the user for a specific filename (you can assume the user input is valid). The program must then read the specified file and produce a summary of the grades, including: the number of people who passed the class, the number of people who did not pass the class, the average of all the final grades within the class and the name/grade of the students with the highest/lowest grades in the class. The final grade can be calculated with the following weights: assignment=25%, midterm=25%, exam=50%. To pass the course, a student must have received a final grade of 50% or greater and a final exam grade of 50% or higher. Several example input files have been included on the assignment page, along with files summarizing the expected output.

All files used for this problem will have the following line-by-line structure:

`Student1_first_name Student1_last_name Student1_student_number Student1_assignment_grade Student1_midterm_grade Student1_exam_grade Student2_first_name Student2_last_name Student2_student_number Student2_assignment_grade Student2_midterm_grade Student2_exam_grade ...etc... `

Write a function called ismultiple which takes 2 integer arguments (a and b). This function must return True if b is a multiple of a (i.e., a divides into b evenly) and False otherwise. Write a second function called commonmultiple which takes 3 integer arguments (a, b, and c). This function must return True if c is a multiple of both a and b, and False otherwise. Additionally, the commonmultiple function must use two calls to the ismultiple function to compute its return value. Once you have implemented both functions, include testing code that asks the user to enter two numbers (a and b) and prints out all numbers between 1 and 100 (inclusive) that are common multiples of a and b. Save your functions and testing code in a file called a3p2.py and add it to your submission zip file.

Python provides slicing functionality for lists, but for this question, you will implement your own function capable of producing list slices (note: you cannot use the slicing operator in your solution). The function should be called slice and take the following three arguments in this specific order:

- A list, source, which the slice will be created from. This list cannot be modified by your function.
- A positive integer, start, representing the starting index of the slice you will create. If this value is not in the range [0, len(list)-1], your function should return an empty list.
- A positive integer, end, representing the ending index of the slice you will create. If this value is not in the range [start, len(list)-1], your function should return an empty list.

If the parameter values are acceptable, your function will return a list that contains the items from source beginning at the index start and ending at the index end (inclusive). This is different from the Python slice operator, as the item at the index end is also included in the new list. Examples:

1 |
mylist = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"] |

Save your code is a file called a3p3.py and add it to your submission zip.

Your zip file should contain your a3p1.py, a3p2.py, and a3p3.py files.

Submit your assignment3.zip file to cuLearn.

Make sure you download the zip after submitting and verify the file contents.

Contact Us(Ghostwriter Service)

- QQ：99515681
- WeChat：codinghelp
- Email：99515681@qq.com
- Work Time：8:00-23:00

- Ghostwriter Stock Market Assignment,R ... 2019-11-11
- Cse130-01 Assignmenthelp With ,Ghostwr... 2019-11-11
- Help With Module Assignment,Ghostwrite... 2019-11-10
- Ghostwriter Ising Model Assignment,Gho... 2019-11-10
- Ghostwriter Cmpsci 187 Assignment,Help... 2019-11-10
- Cs 3413 Assignmentghostwriter ,Help Wi... 2019-11-10
- Linear Regression Assignmenthelp With ... 2019-11-10
- Cab202 Assignment 2, Semester 2 2019 2019-11-09
- Cab340 Assessment 3 Public-Key Encrypt... 2019-11-09
- Comp20003 Algorithms And Data Structur... 2019-11-09
- Etf5952 Quantitative Methods For Risk ... 2019-11-09
- Assignment 3: Implementation Of Pca A... 2019-11-09
- Assignment 3: Implementation Of Pca An... 2019-11-09
- Comp6714-Project (Part-1) 2019-11-09
- Mxb261 - Modelling And Simulation Scie... 2019-11-09
- Introduction To Statistical Machine Le... 2019-11-09
- 159.235 Assignment 3 - A 3D Graphics S... 2019-11-09
- Csc 360: Operating Systems 2019-11-09
- Csc 360: Operating Systems 2019-11-09
- Pbr Assignmentghostwriter ,Help With C... 2019-11-09

Contact Us - Email：99515681@qq.com WeChat：codinghelp

© 2014 www.asgnhelp.com

Programming Assignment Help！