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 general willingness of consumers to purchase a product at various prices is __________. demand supply quantity demanded quantity supplied
why is south asia land likely to have earthquakes
what determines the quality of a conductor
True or False: Conflict sociologists seek to explain educational achievement by looking at the interaction that takes place among students and teachers.
how long do turtles live?
How do you do 14 + something = 80 divided by 4
What is a large body that orbits a star and does not produce it's own light
Kevin claims he can draw a trapezoid with 3 right angles.Is this possible?explain
what was the most important factor in allowing the cities and villages to grow in egypt?
Select the definition of democracy. A. rule by many B. rule by a representatives C. rule by religious leaders D. rule by a few individuals B!!!!???