Instructions from your teacher: Write a Python program that does the following: Displays a welcome message Prompts a...

70.2K

Verified Solution

Question

Programming

Instructions from your teacher:

Write a Python program that does the following:

  1. Displays a welcome message

  2. Prompts a user to enter a number (an integer), and then convertsthat value from inches to feet. If the user entered a negativenumber, display an error message telling the user that it was not a\"positive \" number and prompt the user to enter a number again.

  3. Displays the converted value, then \" feet\"

  4. Continue converting the user's valid values until the userenters 0. Your program should then display a goodbye message.

Example 1:

 
 

Welcome to my inches to feet converter!

 

Please enter a number of inches: 32

 

2.7 feet

 

Please enter a number of inches: 60

 

5.0 feet

 

Please enter a number of inches: -20

 

Please enter a positive number!

 

Please enter a number of inches: 40

 

3.3 feet

 

Please enter a number of inches: 0

 

Have a nice day!

Example 2:

 
 

Welcome to my inches to feet converter!

 

Please enter a number of inches: -32

 

Please enter a positive number!

 

Please enter a number of inches: -21

 

Please enter a positive number!

 

Please enter a number of inches: -10

 

Please enter a positive number!

 

Please enter a number of inches: 0

 

Have a nice day!

Answer & Explanation Solved by verified expert
3.7 Ratings (345 Votes)
Python codeprinting Welcome messageprintWelcome to my inches to feet converteraccepting number of    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students