# exercise 2-1:
print("exercise 2-1:\n")
message1 = "This is a simple message saved in a variable"
print(message1)

# exercise 2-2:
print("\nexercise 2-2:\n")
message2 = "initial message"
print(message2)

message2 = "changed message"
print(message2)

# exercise 2-3:
print("\nexercise 2-3:\n")
name = "Ali"
print("Hello " + name + ", it's fantastic to learn Python!")

# exercise 2-4:
print("\nexercise 2-4:\n")
name = "ali"
print(name.title())
print(name.lower())
print(name.upper())

# exercise 2-5:
print("\nexercise 2-5:\n")
famous_quote = "John F. Kennedy once said, \"Those who dare to fail miserably can achieve greatly.\" "
print(famous_quote)

# exercise 2-6:
print("\nexercise 2-6:\n")
famous_person = "John F. Kennedy"
message = famous_person + " once said, \"Those who dare to fail miserably can achieve greatly.\""
print(message)

# exercise 2-7:
print("\nexercise 2-7:\n")
my_name = "\t\t\t\t\t\t\tali\n\n\n\n\n\n\n"
print(my_name)
print(my_name.lstrip())
print(my_name.rstrip())
print(my_name.strip())

# exercise 2-8:
print("\nexercise 2-8:\n")
print(5 + 3)
print(13 - 5)
print(64 / 8)
print(16  * 0.5)

# exercise 2-9:
print("\nexercise 2-9:\n")
my_favorite_number = 7

#Python knows that the variable could represent either the numerical value 23 or the characters 2 and 3. 
#When you use integers within strings like this, you need to specify explicitly that you want Python to use the integer as a string of characters. 
#You can do this by wrapping the variable in the str() function, which tells Python to represent non-string values as strings
message_9 = "My favorite number is: " + str(my_favorite_number)

print(message_9)

# exercise 2-10:
print("\nexercise 2-10:\n")
#This little code will show my full name:
first_name = "Sayyed Ali"
last_name = "Moradi"
full_name = first_name + " " + last_name
print(full_name)

# exercise 2-11:
print("\nexercise 2-11:\n")
import this
