Jul 24, 2024
print("Hello World")
age = 20
print(age)
input()
function to receive input:
name = input("What is your name? ")
print("Hello " + name)
age = int(input("Enter your age: "))
, >=, <, <=, == (equal), != (not equal).
and
, or
, not
.if temperature > 30:
print("It's a hot day")
elif temperature > 20:
print("It's a nice day")
else:
print("It's a cold day")
i = 1
while i <= 5:
print(i)
i += 1
for num in range(1, 6):
print(num)
names = ["John", "Bob", "Marsh"]
len()
for length of the list.in
to check for existence in list.numbers = (1, 2, 3)