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 concept of friendship portrayed in both Society and Solitude and Chapter 1 of Nature
PLEASE HELP!!! HURRY EMERGENCY !! 50 PTS AND BRAINLIEST Create a graph of the combined function h(x) = f(x) + g(x) in which f(x) = x - 6 and g(x) = x + 6. On y
There needs to be work shown
Which economic activities did the governor of East Florida promote?
What is the angle of elevation of the sun if a 45 foot tall flagpole casts a 22 foot long shadow?
What is the end behavior of the function f(x)=-1/2 x^3​
Which types of pressure are examples of positive peer pressure? Check all that apply. A.pressure to avoid drugs B.pressure to avoid family members C.pressure to
what is the definition of a term?
What is a key element in democracy?
True or False. You can become infected with HPV (Human Papillomavirus), by having sexual contact with someone infected with HPV (even one time).