PythonBasics0000

Run Settings
LanguagePython
Language Version
Run Command
print("Hello World!") print() # This is a comment. # SyntaxError # print("This is an example of a SyntaxError." print("This is NOT an example of a SyntaxError.") print() # TypeError # print("5" + 5) print("This is NOT an example of a TypeError.") print("5" + str(5)) print() # NameError # print(egg) print("This is NOT an example of a NameError.") egg = 5 print(egg) print() # IndentationError # if True: # print("True") print("This is NOT an example of an IndentationError.") if True: print("True") print() # Addition print(3 + 5) # Output: 8 # Subtraction print(5-3) # Output: 2 # Multiplication print(5 * 3) # Output: 15 # Division print(5/3) # Output: 1.6666666666666667 # Floor division print(5//3) # Output: 1 # Modulus, modulo, MOD, % print(5 % 3) # Output: 2 # Exponentiation, power of print(5**3) # Output: 125 # Precedence (order of operations, PEMDAS) print(1+2*3/4) # Output: 2.5 print(1-2/3*4) # Output: -1.6666666666666665
Editor Settings
Theme
Key bindings
Full width
Lines