| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Programming Exercises - Input

Page history last edited by Steve Sweeney 10 years, 2 months ago

 

  1. Write a program that prompts (asks) the user for their name and age, and then outputs this information using one or two nicely formatted sentences.  For example, if the user enters the name "John" and the age "16", the program might output, "Hello John.  I see that you are 16 years old."

  2. Write a program that asks two questions:  first name and last name.  The program should then output this information with the last name first.  For example, if the user entered "Fred" and "Flintstone", the output would be "Flintstone, Fred".

  3. Write a program that prompts the user for their full address, one piece of information at a time, and save each piece of information in a different variable.  Use variables for streetNumber, streetName, city, province, and postalCode.  Make sure your output is nicely formatted, as it might appear on an envelope for mailing.

  4. Write a program that prompts the user for 4 course marks.  Each mark should be saved in a properly named variable.  Once the user has entered the last mark, output a summary of the marks.

Comments (0)

You don't have permission to comment on this page.