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

What is the value of x? (Serious answers only plz)
1) What was your favorite thing about this week? 2)What was your favorite thing about literacy class this week? 3) What are you most proud of from this week? 4)
Need help with Trig fast
URGENT!! PART II please answer!! due at 11:59
PLS HELP Find the area of the Polygon
PLEASE HELP MEH I'M STRUGGLIN YmY The construction of a tangent to a circle given a point outside the circle can be justified using the second corollary to the
Enter the correct answer in the box. What standard form polynomial expression represents the perimeter of this quadrilateral? 3x– 4x + 3 4x3 + 2x x² – 2x x2 + 6
List 3 ways that the male organs of the flower are different from the female organs of the flower pls don't answer if u don't know the answer , it's annoying
Arteries near the heart expand as blood rushes in after each contraction. Which component in the arteries allows this expansion?
Investment, as defined by economists, would include the purchase of a​