comparison python 1

comparison python

number_of_seats = 30
numbre_of_guests = 25

if numbre_of_guests <= number_of_seats:
   print("it's ok")
else: 
   print("it's not ok")

Here is what the above code is Doing:
1. We're defining a variable called number_of_seats and setting it equal to 30.
2. We're defining a variable called numbre_of_guests and setting it equal to 25.
3. We're using an if statement to check if the number of guests is less than or equal to the number of seats.
4. If the number of guests is less than or equal to the number of seats, we print "it's ok".
5. If the number of guests is not less than or equal to the number of seats, we print "it's not ok".

Similar Posts