Firsty = "Alexa" Lasty = "Wingate" print Firsty," ", Lasty Firsty = raw_input("What is your first name? ") Lasty = raw_input("What is your last name? ") print "Your name is", Firsty, " ", Lasty, "!" Length = float(raw_input("What is the length of the room? (in feet)")) Width = float(raw_input(" What is the width of the room? (in feet)")) print " The area of the room is", Length*Width, "square feet." Length = float(raw_input("What is the length of the room? (in feet)")) Width = float(raw_input(" What is the width of the room? (in feet)")) CostSquareYard = float(raw_input(" What is the cost per square yard?")) print " The area of the room is", Length*Width, "square feet, which is", (Length*Width)/9, "square yards." print " The cost of the carpet is $", CostSquareYard*((Length*Width)/3), "." Quarters = (int(raw_input("How many quarters do you have?")))*25 Dimes = (int(raw_input(" How many dimes do you have?")))*10 Nickels = (int(raw_input(" How many nickels do you have?")))*5 Pennies = int(raw_input(" How many pennies do you have?")) print " You have $", (Quarters+Dimes+Nickels+Pennies)*0.01, "in total."
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question