14 May Sunday 16:00 Python Homework 05.12.
Question 1.
Write a program (you need to create new file in python) that asks for your first name, then asks for your last name, and then prints a message with your first and last names in it.
Sample input:
First Name: Peter
Last Name: Parker
Sample output:
My name is Peter Parker.
Hint:
Please fill up the empty line to finish the program:
firstName = input(“______“)
lastName = _____________
print(“My name is”, ______, ______)
Question 2.
Write a program that helps the user add up her change. The program should ask:
- “How many quarters?”
- “How many dimes?”
- “How many nickels?”
Then it should give the total value of the change
Hint:
Do not forget to change the answer from the input into an integer number by using int(), for example:
quarters = int(input(“How many quarters?”))
Sorry, the comment form is closed at this time.