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

help ill give brainliest aand 5 star
Please help, I’ll mark your answer as brainliest.
A cartoon of a spaceship being pulled into a black hole. Which details from this image help you answer the question, "What might happen to a spaceship approach
You are headed off to college. Some close family members decide it would be a good idea to buy a house in the college town and then rent it out to students, wit
The lecturer was tired _ He had a ten minute rest
Subconcussive head impacts: Cause symptoms just like a concussion. Always result in long-term health problems. Can be reduced by limiting collisions on the spor
Eight times x is less than or equal to 29 Translate the sentence into an inequality
Phrase or clause they contain about seventy five percent of its fresh water
name the bacteria found in the root nodules of leguminuos plant​
Friction creates heat and lowers the _______