logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Umar KhalidManagement
(5/5)

930 Answers

Hire Me
expert
Peter BernerGeneral article writing
(5/5)

515 Answers

Hire Me
expert
Hiamnshu BholaData mining
(5/5)

948 Answers

Hire Me
expert
Connor BlackStatistics
(5/5)

567 Answers

Hire Me
R Programming
(5/5)

The program should determine whether the month times the day equals the year.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Fundamentals of Programming 

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.

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

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

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme