Make sure your name is on all pages turned in. TAKE YOUR TIME and READ QUESTIONS CAREFULLY! I give partial credit, so if you don't know the complete answer to a question, write down the parts that you do know. Unless a question asks you to write a complete program, you only need to write the statements required to perform the requested task. TOTAL POINTS = 60.
1. (13 points) Write a function (readFile) which will read integers from a file (numbers.txt). The function will
a. calculates the average of all the numbers stored in the file.
b. returns the average.
2. (13 pts) Write a function (getCount) that will allow the users to enter integer numbers. The program will terminate when -999 is entered.
The program
• Returns the count of numbers that are divisible by 10.
3.(10 pts) What value is printed by the call findValue(10, 3, 7) for the function calculate below?
def findValue (a, b, c):
if (a == c % b):
return a // c
elif (a – c != 3):
if (b >= c):
return b % c
else:
return c * a
return a * b % c
print(findValue(10, 3, 7))
What value it will print: _______________________________________
3. (13 points) The date June 10, 1960, is special because when it is written numerically, the month time the day equals the year:
6/10/60 --> 6*10 = 60
Design a function (doCalculation) that
a. asks the user to enter a month (in numeric form), a day, and a two-digit year in three separate inputs.
b. The program should determine whether the month times the day equals the year.
c. If so, it should print, "This date is magic!" Otherwise, it should print, "This date is not magic."
5. (11 points) Write a function that displays the Fahrenheit equivalents of Celsius temperatures. The function will have the Celsius as the parameter.
The formula for converting a temperature from Celsius to Fahrenheit is
F = 9/5 C + 32
where F is the Fahrenheit temperature, and C is the Celsius temperature.
Your function returns the Fahrenheit equivalents.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme