# Craig Persiko # CS 110A sample program # Demonstrates how variables and data types # work in calculations, # including simple input ######################### i1 = 11 f1 = 9.5 name = input("Please enter your name") i1 = int(input("Please enter an integer: ")) f1 = float(input("Please enter a number: ")) print("Using numeric literals:") print("2/3 equals:", 2/3) print("Using the variables storing the values", name, "entered:") print(i1, "*", f1, "equals", i1 * f1) print(i1, "**", f1, "equals", i1 ** f1) print(i1, "/", f1, "equals", i1 / f1) print(i1, "//", f1, "equals", i1 // f1) print(i1, "%", 2, "equals", i1 % 2) ####################### # Sample output: ''' Please enter your name Craig Please enter an integer: 5 Please enter a number: 10.5 Using numeric literals: 2/3 equals: 0.6666666666666666 Using the variables storing the values Craig entered: 5 * 10.5 equals 52.5 5 ** 10.5 equals 21836601.342771385 5 / 10.5 equals 0.47619047619047616 5 // 10.5 equals 0.0 5 % 2 equals 1 '''