- Changing Numbers
- Exponential
- The Module
- Concatenation
- The Plus-Equals
- Multiline Strings
- Exercises

**Feature #8 - Changing Numbers**

ice_cream_price = 1.50 number_of_ice_creams = 4 # prints "6.0" print(ice_cream_price * number_of_ice_creams) # prints "1.5" print(ice_cream_price) #prints #4 print(number_of_ice_creams) # Updating the price ice_cream_price = 2 # prints "8.0" print(ice_cream_price * number_of_ice_creams) # prints "2" print(ice_cream_price) #prints #4 print(number_of_ice_creams)

**Feature #9 - Exponential**

# 2 to the 10th power, or 1.24 print(2 ** 10) # 8 squared, or 64 print(8 ** 2) # 9 * 9 * 9, 9 cubed, or 729 print(9 ** 3) # We can even perform fractional exponents, 4 to the half power, or 2 print(4 ** 0.5)

**Feature #10 - The Module**

# prints 4 because 29/5 is 5 with a remainder of 4 print(29 % 5) # prints 2 because 32/3 is 10 with a remainder of 2 print(32 % 3) # Modulo by 2 returns 0 for even numbers and 1 for odd numbers # print 0 print(44 % 2)

**Feature #11 - Concatenation**

my_birthday = "I am " age = 19 my_birthday_two = " years old" # Concatenating an integer with strings is possible if we turn the integer into a string first full_string = my_birthday + str(age) + my_birthday_two # prints "I am 19 years old"

**Feature #12 - The Plus-Equals**

# we have a variable with a number saved number_km_runned = 10 # we need to update with another 2 kms today number_km_runned += 2 # when we print, the new value is the old value plus the number after plus-equals print(number_km_runned) #Prints 12

**Feature #13 - Multiline Strings**

lorem_ipsum = """ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. """

**Final Exercises**

string1 = "The wind, " string2 = "which had hitherto carried us along with amazing rapidity, " string3 = "sank at sunset to a light breeze; " string4 = "the soft air just ruffled the water and " string5 = "caused a pleasant motion among the trees as we approached the shore, " string6 = "from which it wafted the most delightful scent of flowers and hay."

**Conclusion:**

**Exercise Solution**

quilt_width = 8 quilt_length = 12 print(quilt_width * quilt_length) quilt_length = 8 print(quilt_width * quilt_length) ---------------------------------------- total_price = 0 new_sneakers = 50.00 total_price += new_sneakers nice_sweater = 39.00 fun_books = 20.00 # Update total_price here: total_price += nice_sweater total_price += fun_books print("The total price is", total_price)