0
Section 15.2 results in undefined variable
Hey! Iām trying to use inputs to create the phrase āhihihi.ā But I keep getting an āundefined variable response for x. I cannot for my life figure out whatās wrong. Any chance any of you might be willing to help an utter newb? Hereās my code: x=input("hi") y=int(input(3)) print(x*y) Thanks!
4 Answers
+ 3
Josh05
No as there is input so you should use input function but without passing any argument.
x = input()
y = int(input()
print (x * y)
+ 2
joshua Meyers
Don't write anything inside input() function
+ 1
Thanks! So, should the code just read:
X=āhiā
Y=int(3)
Print(x*y)
Thanks!
0
Iām an idiot. Thanks so muchāi really appreciate it!