Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hello World")
- ingresso = input("Dammi qualcosa in ingresso: ")
- print("Hai inserito:", ingresso)
- def identity(num):
- return num
- def absolute_value(num):
- if(num >= 0):
- return num
- return -num
- # Operators
- 4 + 5
- 5 - 2
- 5 * 2
- 5 ** 2
- 5 / 2
- 5 // 2
- result = 4 ** 3
- print("ciao", result, "tonno")
- age = 25
- height = 140
- # > < >= <= == !=
- # not(a and b) === not a or not b
- # not(a or b) === not a and not b
- if(not(not(age >= 18) and not(height > 160))):
- print("Puoi salire sulla giostra - dell' if")
- else:
- print("Sorry non puoi salire")
- while(not(not(age >= 18) and not(height > 160))):
- print("Puoi salire sulla giostra")
- age = age - 1
- print("Altra cosa")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement