2**100we find that there are 31 digits in 2100.
3**11 % 11we find the answer 3.
3.0represents a float and
3represents an integer.
# To calculate body mass index height = float(input("What is your height in metres? ")) weight = float(input("What is your weight in kilos? ")) print("Your BMI is", weight / height**2)
# To decide if a number is non-zero number = int(input("Enter an integer: ")) print("It is", number != 0, "that your number is non-zero")
In the first case, the condition is always true so the program will just print
Spam Spam and eggs
over and over again forever and will never print
In the second case the condition is never true, so will not print anything about spam but will