Question #143481

How do I write a whole number as input, multiplys that number by 12, and then outputs the product.


Expert's answer

You define your number trough the variable a

a = int(input("Enter a number:")) #int is for integer

Then you want to multiply a number by 12, for this a new variable b has to be defined

b = a*12

To get the output as a number you can simply use command print()

print("The output is", b)

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