How do I write a whole number as input, multiplys that number by 12, and then outputs the product.
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)
Comments
Leave a comment