Ask coding questions

← Back to all posts
Asking about how to write this code
TZLALA (1)

This is a PRACTICE question. Create a function named first_is_smaller(...) which receives two integer parameters (n1 and n2) and returns a Boolean value True if the value in the first parameter is smaller than the second and False otherwise.
As an example, the following code fragment:
print(first_is_smaller(10,20))
should produce the output:
True

Comments
hotnewtop
John_WardWard (385)

This sounds like homework to me @TZLALA . This is suspiciously called a "Practice Question" and it sounds very much like you are cheating. Please don't if you are doing so.

Geocube101 (627)

Python
def first_is_smaller(n1, n2):
return n1 < n2