Problem: Find minimum and maximum of given 2 numbers.
Solution in Python:
def max(n, m):
"""
Author: Mayur P Srivastava
"""
if n >= m:
return n
return m
def min(n, m):
"""
Author: Mayur P Srivastava
"""
if n < m:
return n
return m
Concepts Learned: Logical conditions.
No comments:
Post a Comment