Python Program to find the Biggest and Smallest of 3 numbers using lists

Hello people, here we discuss a simple python program which finds the biggest and smallest number out of given three numbers. Here we use python lists in this program.

Here we add the 3 numbers to list and use max and min functions on it to find the biggest and smallest number respectively.

In the previous tutorials, we discussed about finding biggest and smallest number using functions : Link 

Program on Github

Biggest and Smallest of 3 numbers – Code Visualization

Video :

Task :

To find smallest and biggest number out of given 3 numbers.

Approach :

  • Read 3 input numbers using input() or raw_input().
  • Add these 3 numbers to list lst = [number1, number2, number3].
  • Using max() function to find the biggest number max(lst).
  • Finding smallest number by using min() function min(lst).
  • Print the result.

Program on Github

Program :

Output :

Biggest and smallest of 3 numbers using lists - programminginpython.com
Biggest and smallest of 3 numbers using lists – programminginpython.com
Biggest and smallest of 3 numbers using lists - programminginpython.com
Biggest and smallest of 3 numbers using lists – programminginpython.com

Program on Github

Leave a Reply