Python Web -L04 (Operators Precedence)

Run Settings
LanguagePython
Language Version
Run Command
#result = 7 - 4 + 3 * 6 / 2 ** 2 % 5 (original) result = 7 - 4 + (((3 * 6) /(2 ** 2)) % 5) print(result) #result = 10 + 3 * 2 < 20 and 15 % 4 == 3 or not 5 - 3 * 2 > 0 (original) result = (((10 + (3 * 2)) < 20) and ((15 % 4) == 3)) or (not ((5 - (3 * 2)) > 0)) print(result) # LEAPYEAR : year is multiple of 4 and not multiple of 100 or year is multiple of 400 def mult_leapyear(y): return (y % 4 == 0 and not y % 100 == 0) or (y % 400 == 0) print(mult_leapyear(2000)) print(mult_leapyear(2100))
Editor Settings
Theme
Key bindings
Full width
Lines