filmov
tv
Python Program to find the Biggest and Smallest of 3 numbers
Показать описание
Python Program to find the Biggest and Smallest of 3 numbers.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
DataCamp premium Subscription at $49/year.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
--- Read 3 input numbers using input() or raw_input().
--- Use two functions largest() and smallest() with 3 parameters as 3 numbers
--- largest(num1, num2, num3)
-- check if num1 is larger than num1 and num2, if true num1 is largest, else
-- check if num2 is larger than num1 and num3, if true num2 is largest,
-- if both the above fails, num3 is largest
-- Print the largest number
--- smallest(num1, num2, num3)
-- check if num1 is smaller than num1 and num2, if true num1 is smallest, else
-- check if num2 is smaller than num1 and num3, if true num2 is smallest,
-- if both the above fails, num3 is smaller
-- Print the smallest number
*********************
Use code FLAT25 for 25% OFF
Use code LUCKY50 and get 50% off on Lucky Hours
*********************
Course Suggestion:
Want to learn python with strong fundamentals? If yes, I strongly suggest you take the course below.
-~-~~-~~~-~~-~-
Note: Some of my links and reviews I share are affiliate links, which means I earn a little commission from it when you purchase through those links, without any extra costs to you.
-~-~~-~~~-~~-~-
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
DataCamp premium Subscription at $49/year.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
--- Read 3 input numbers using input() or raw_input().
--- Use two functions largest() and smallest() with 3 parameters as 3 numbers
--- largest(num1, num2, num3)
-- check if num1 is larger than num1 and num2, if true num1 is largest, else
-- check if num2 is larger than num1 and num3, if true num2 is largest,
-- if both the above fails, num3 is largest
-- Print the largest number
--- smallest(num1, num2, num3)
-- check if num1 is smaller than num1 and num2, if true num1 is smallest, else
-- check if num2 is smaller than num1 and num3, if true num2 is smallest,
-- if both the above fails, num3 is smaller
-- Print the smallest number
*********************
Use code FLAT25 for 25% OFF
Use code LUCKY50 and get 50% off on Lucky Hours
*********************
Course Suggestion:
Want to learn python with strong fundamentals? If yes, I strongly suggest you take the course below.
-~-~~-~~~-~~-~-
Note: Some of my links and reviews I share are affiliate links, which means I earn a little commission from it when you purchase through those links, without any extra costs to you.
-~-~~-~~~-~~-~-
Комментарии