Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that: Asks the user to i put their current age as an integer. If the input age is not an integer the

Write a program that:
Asks the user to iput their current age as an integer.
If the input age is not an integer the program exits by saying that you have entered an invalid age. (Note: use try and except statements to program this)
The program then asks the user to input their current college standing i.e., freshman, sophomore, junior, or senior
The program then suggests the age at which the user should ideally graduate and finally tells the user to have a nice day.
(Note: use a 4-year rule for graduation)
Note: Boolean expressions can also be used to compare strings
Your output should look like so:
How old are you? 20
What is your current standing in college? freshman
Your age at graduation will be 24 years
Your output should look like so:
How old are you? Twenty
You have entered an invalid age.
Have a nice dav
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions