← Back to Dashboard

Variables DataTypes Operators: Easy Exercises EASY

"""
Topic 02: Variables, Data Types & Operators - EASY Exercises (10)
"""

# Exercise 1: Create a variable named 'city' and assign the value "New York" to it. Print the variable.
# Write your code below:


# Exercise 2: Create two variables 'a' and 'b' with values 5 and 10. Print their sum.
# Write your code below:


# Exercise 3: Create a variable 'greeting' with the value "Hello" and 'name' with your name.
# Concatenate them with a space and print the result.
# Write your code below:


# Exercise 4: What is the data type of the value 10.5? Use the type() function to verify.
# Write your code below:


# Exercise 5: Create a variable 'is_python_fun' and set it to True. Print the variable.
# Write your code below:


# Exercise 6: Divide 20 by 3 and print ONLY the integer part of the result (floor division).
# Write your code below:


# Exercise 7: Find the remainder when 27 is divided by 4 using the modulus operator.
# Write your code below:


# Exercise 8: Create a variable 'radius' with value 7. Calculate the area of a circle (Area = 3.14 * radius^2).
# Write your code below:


# Exercise 9: Convert the string "100" to an integer and add 50 to it. Print the result.
# Write your code below:


# Exercise 10: Create a variable 'price' with value 99.99. Convert it to an integer and print the result.
# Observe what happens to the decimal part.
# Write your code below: