Need help for my python codes
Hi) I am having some problems in my python codes so please help me out in producing the desired outputs from those code lines.
Write a program that uses raw_input to prompt a user for their name and then welcomes them. Note that raw_input will pop a dialog box. Enter Sarah in the pop-up box when you are prompted so your output will match the desired output below.
name = raw_input('Enter your name')
Write a program to prompt the user for hours and rate per hour using raw_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 raw_input to read a string and float() to convert the string to a number. Do not worry about error checking or bad user data.
# This first line is provided for you
hrs = raw_input("Enter Hours:")
Hint: Do you know what the multiplication operator is in Python (and most other programming languages, for that matter)?
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)