id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

Boolean Expressionsless_than_or_equal

prev  |  next  |  chance

Determine if one value is greater than or equal to another with the <= operator. Notice the = comes after the <.

def less_than_or_equal(val1, val2):
    result = val1 <= val2
    return result
Function Call  Return Value
less_than_or_equal(6, 4)
less_than_or_equal(12, 12)
less_than_or_equal(8, 8)
less_than_or_equal(12, 24)
less_than_or_equal(7, 2)

Experiment with this code on Gitpod.io

⬅ Back