aboutsummaryrefslogtreecommitdiff
path: root/src/Lecture4/live/live1.py
blob: da505f2ff0fd221bc34ce4dda04df6a69b33471d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
print(2+2)

x = input("Input something: ")
print("Your input was:", x, "of type", type(x))

x_number = int(x)
print("Converted to a number:", x_number, "of type", type(x_number))

if x_number > 10:
	print("Your number was large!")
	print("It was larger than 10")
	z = x_number-10
	print("This is a smaller number:", z)
else:
	print("Your number was small")
	
print("Bye")

Generated with cgit - Back to sebastiano.tronto.net