Python Program to find the Biggest and Smallest of 3 numbers

preview_player
Показать описание
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.
-~-~~-~~~-~~-~-
Рекомендации по теме
Комментарии
Автор

This helped me think to figure out how to solve my problem without defining as we're not yet there in my class. Thanks!!!

JelilatAdesiyan
Автор

You don't need the Def statement in zybooks, you just do if, el if, else and print something like smallest_number.

kingadamus
Автор

How can I make to avoid repeated numbers?

donhjoe
Автор

What if i need to insert "while not" ? Thankyou

alyssacortez_
Автор

how to get the number if the user input one number sample 173 how will you print the 7 largest number?

icelandergaming
Автор

What about return? don't you need to use it somehow

pexx
Автор

how to display in output from lower to largest like if i put 1, 5,7,2 as user . The output out come like lowest to largest 1, 2, 5, 7

azharrauf
Автор

I am getting largest num as output only,
How to print larg. And small together

rahulpatil
Автор

can the code find the largest number in a list using a smaller

sreshta
Автор


DataCamp premium Subscription at $49/year. 2023 offer!


Programminginpython
Автор



Use code FLAT25 for 25% OFF

Use code LUCKY50 and get 50% off on Lucky Hours

Programminginpython