Curriculum
What are the data types of the following variables?
x = "Python"
y = 42
z = 3.14
is_ready = False
Write a Python program that:
Write a Python program that:
name = "Alice"
age = 30
height = 5.6
likes_python = True
print(f"My name is {name}.")
print(f"I am {age} years old and {height} feet tall.")
print(f"Do I like Python? {likes_python}")
My name is Alice.
I am 30 years old and 5.6 feet tall.
Do I like Python? True
num1 = int(input("Enter the first number: "))
num2 = int(input("Enter the second number: "))
result = num1 + num2
print(f"The sum of {num1} and {num2} is {result}.")
Not a member yet? Register now
Are you a member? Login now