print ("The square of", num, "is", num * num, '.', sep=' ')
#6: Multiplication sequence
x = eval(input("Enter a number: "))
print (x, 2*x, 3*x, 4*x, 5*x, sep='---') #print out x, 2x, 3x, 4x and 5x
#7: Kilogram to Pound converter
weight = eval(input('Enter a weight in kg: '))
print('That is', weight * 2.2, 'pounds.') #for every kg there is 2.2 pounds
#8: Total and Average variable
x = eval(input("Enter a value x: "))
y = eval(input("Enter a value y: ")) z = eval(input("Enter a value z: ")) total = x + y + z #variable that sums xyz average = total / 3 #average variable print("Total x, y, z is: ", total) print("Average: ", average) print () #9: Tip calculator
meal_price = eval(input("Meal price: $"))
tip_percent = eval(input("Tip percentage(%) you want to leave: ")) tip_amount = (tip_percent / 100) * (meal_price) total_bill = (tip_amount) + (meal_price) print ("Your meal is: $", meal_price, " and you tipped ", tip_percent, "% at: $", tip_amount, ".", sep = '') print ("Your total bill is: $", total_bill, sep = '')