# Start writingExercise 1.1: The cover price of a book is 24.95 EUR, but bookstores get a 40 percent discount. Shipping costs 3 EUR for the first copy and 75 cents for each additional copy. Calculate the total wholesale costs for 60 copies.#
def totalWholesaleCost(copyNumber):
coverPrice = 24.95*(1-0.4)
shippingCost = 3 + copyNuber*0.75
totalWholesaleCost = sum(coverPrice,shippingCost)
return totalWholesaleCost
totalWholesaleCost(5)
# 5.1 Countdown
def countdown():
a = 20
while True:
if a == 0:
break
print("Blast off!")
print(a)
a -=1
def Countdown():
for count in range(20,0,-1):
print(count)
print("Blast Off!")
#1.3
def timeAlarm():
a = 14
i = 535 % 24
timeAlarm = a + i
print(timeAlarm)
#4.1
#Exercise 1.2
print(2/0) # produces a ZeroDivisionError as dividing by zero is not allowed
# 5.1 Countdown
def Countdown():
for count in range(20,0,-1):
print(count)
print("Blast Off!")
# Exercise 5.2