Question #133384

Write a program that accepts a whole number as input, multiplies that number by 12and then outputs the product Hint: Remember that to think about the data type that the user will input. How can you make sure that their input is entered as a number?

Expert's answer

try:
   a = int(input("Enter number: " ))
   print("Product (x12) = " + str(a * 12))
except:
   print("Entered not a number")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS