Assignment 2.3 | Week-4 | Programming for Everybody (Getting Started with Python) By Coursera

Assignment 2.3 | Week-4 | Programming for Everybody (Getting Started with Python) By Coursera

 

Coursera
Programming for Everybody (Getting Started with Python)
Week 4
 Assignment 2.3 

 Question:  2.3 Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Use 35 hours and a rate of 2.75 per hour to test the program (the pay should be 96.25). You should use input to read a string and float() to convert the string to a number. Do not worry about error checking or bad user data.

 Input: 

hrs = float(input("Enter Hours:"))
rate = float(input("Enter Rate:"))
pay= hrs*rate
print ("Pay:",pay)
Assignment 2.3

Assignment 2.3-Week-4-Programming-for-Everybody-Getting Started with Python-By-Coursera


 Output: 
Pay: 96.25
The above questions are from “Programming for Everybody (Getting Started with Python)” You can discover all the refreshed questions and answers related to this on the “Programming for Everybody (Getting Started with Python) By Coursera” page. If you find the updated questions or answers, do comment on this page and let us know. We will update the answers as soon as possible.


Do Not Only Use These Quizzes For Getting Certificates.You Can Take Help From These Quizzes Answer. All Quizzes & Contents Are Free Of Charge. ✅

If You Want Any Quiz Answers Then Please Contact Us

Leave a Comment