TORONTO KIDS COMPUTER CLUB | Sunday 16:00 Python Homework 05.12.
post-template-default,single,single-post,postid-16280,single-format-standard,ajax_fade,page_not_loaded,,no_animation_on_touch,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Sunday 16:00 Python Homework 05.12.

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.


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


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?”))


No Comments

Sorry, the comment form is closed at this time.