Question: Create a program that has all three of the basic instruction types: input processing output Design a program that will prompt for personal information and

Create a program that has all three of the basic instruction types:

  • input
  • processing
  • output

Design a program that will prompt for personal information and then produce a single integer (whole number) that "predicts" your age and shoe size.

This program should work for anyone. That is, don't hard-code the input so that it only works with your personal information!

Ask the user for their shoe size and the year they were born. The first step of the processing is to multiply the shoe size by five. Step two is to add 50 to that number, and then you take that total and multiply it by 20. Next, you add 1,021 to that total and then subtract the year the user was born.

The single number you output as the answer should have the user's age at the end (as long as they are not 100 or older) and the shoe size as the first one or two digits. It may be off by one depending on exactly when the user's birthday is.

  • Use draw.io or Visio to first create a flowchart.
  • Save your flowchart as a PDF.
  • Implement your design in Python (name your file shoe_age.py)
  • Use the homework.py template (in the Reference module) as a style guide.

An example run (your program must produce the same output given this input):

Enter your shoe size: 10 Enter the year you were born: 1995 Shoe Size and Age: 1026

Does it give you the right answer? Try it with others (e.g., friends and family).

Upload:

  • shoe_age.pdf
  • shoe_age.py

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!