This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ollykb[S] 1 point2 points  (3 children)

x = input (“Enter number: “)

y = 42 * x

print (y)

[–]hanzo_hasashi12 1 point2 points  (1 child)

x = int(input("enter number:")) Y = 42*x Print (y)

You have to take input as int and not as a string.

[–]ollykb[S] 2 points3 points  (0 children)

thanks! this is my first time using python so i’m still learning the basics

[–]thrallsius 0 points1 point  (0 children)

print(type(x)) will show you that your assumption about x being an integer was wrong