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

on sara's computer, 3/8 of the hard drive is files. Of the files, 1/6 are games . What part of the hard drive is games?
A snowball is launched horizontally from the top of a building at v = 16.9 m/s. If it lands d = 44 meters from the bottom, how high (in m) was the building?
two methods of active transport
10u + 7 = 8 ( 2u - 4 ) - 9
36 is _______% less than 60?
Why did Henry Clay group his resolutions in pairs in the Compromise of 1850?
A snowball is launched horizontally from the top of a building at v = 16.9 m/s. If it lands d = 44 meters from the bottom, how high (in m) was the building?
36 is _______% less than 60?
how have computers changed mapmaking in recent years
3 ( 4d + 1 ) - 9d = 6 - 2d