idjfjcjs7291 idjfjcjs7291
  • 02-12-2022
  • Computers and Technology
contestada

Write a program that accept a whole number a input, mutiplie that number by 21, and then output the product

Respuesta :

candlejenner candlejenner
  • 03-12-2022

Answer:

while True:

   try:

       whole_number = int(input("Enter a whole number: "))

       break

   except ValueError:

       print("That is not a whole number. Try again.")

product = whole_number * 21

print("The product is", product)

Explanation:

using while true and except ValueError to make sure the user enters a whole number

Answer Link

Otras preguntas

The coca-cola company produces diet coke, diet coke with splenda, and coke zero along with a number of other flavors. these products are part of coke's:
HELP ASSAP WITH THIS QUESTION!!!!
What is the greatest common factor of 30b^2, 80b^2, and 20b^3
Write a fraction that is equivalent to this number 0.997
Which features are associated with divergent boundaries?
Which figure shows the correct dimensions of a 1/4 scale drawing of the given figure?
A sock drawer contains 5 different colors of socks. It has 20 white, 10 black, 10 gray, 6 red, and 4 purple. If you reach into the drawer and choose a sock rand
Multiplying a number by 2 and then dividing by 3 is the same as multiplying by what number?
A moraine is made up of ________
The Industrial Revolution had what effect on the British textile industry? A. It made the industry more reliant on machines rather than making cloth by hand