Programming Fundamentals/Variable Examples Python

Overview
The following examples demonstrate data types, arithmetic operations, and input in Python.

Output
Integer i = 1234567890 Float f = 1.23456789012345 String s = string Boolean b = true

Discussion
Each code element represents:
 * begins a comment
 * assign literal values to the corresponding variables
 * calls the print function
 * calls the print function

Output
a = 3 b = 2 a + b = 5 a - b = 1 a * b = 6 a / b = 1.5 a % b = 1

Discussion
Each new code element represents:
 * represent addition, subtraction, multiplication, division, and modulus, respectively.

Output
Enter Fahrenheit temperature: 100 100.0° Fahrenheit is 37.77777777777778° Celsius

Discussion
Each new code element represents:
 * reads the next line from standard input
 * converts the input to a floating-point value