Part 1 **********************************************************

In Python, a variable is a way to store data so you can use it later. Variables can hold different types of data:

  1. integer

x = 5

  1. Float “Decimal numbers”

x = 3.5

  1. string (Characters enclosed in quotes) A string can contain letters, numbers, and symbols, and it's created by enclosing characters in either single or double quotes. For example:

name = “soda”

  1. Concatenation

You can combine (concatenate) strings using the + operator. Here’s an example:

greeting = "Hello"
name = "Clarissa"
full_greeting = greeting + " " + name  # Combining strings with a space in between
print(full_greeting)

Python supports basic arithmetic operations like addition (+), subtraction (-

), multiplication (*), division (/), and exponentiation (**).

Quiz Yourself: Answers are at the very end of this page😄

Question 1:

What are the three main types of data that variables can hold in Python? Give an example for each type.