+ 2
if i want it to be based on user input?
how should the code look like if i want the num to be based on user input?
4 ответов
+ 1
if youre using python 3 you use input().
code could be something like:
numb1 = input("choose #1 ")
numb2= input("choose #2 ")
print(int(numb1) * int(numb2))
python 2 just do raw_input instead if just input
you need to convert them to an integer. can be done when asking them (i.e numb1= int(input("choose #1 )) ) or at the end like above.
0
maybe you can use the raw_input method
0
i know it has to be with input(), but hows the code should be?
my attempts lead to errors
0
thanks! conversion was what im missing out!