39
loading...
This website collects cookies to deliver better user experience
valid_voting_age=18
your_age=int(input('Enter your age: '))
if your_age >= valid_voting_age
print('You can vote')
if
. That is:valid_voting_age=18
your_age=int(input('Enter your age: '))
if your_age >= valid_voting_age:#new
print('You can vote')
num1=55
num2=0
print(num1/num2)
num1=55
num2=0
try:
print(num1/num2)
except ZeroDivisionError:
print('Cannot divide a number by zero')
num1=20
num2=30
if num1>num2:
print(f'{num1} is less than {num2}')
greater than >
operator instead of <
.