Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

biggest of 3 numbers in python

a=int(input('first number'))
b=int(input('second number'))
c=int(input('third number'))
if a>b:
    if c>a:
        print('c is biggest of three')
    else:
        print('a is biggest of three')
elif b>c:
    print('b is biggest of three')
else:
    print('c is biggest of three')
#output:
#case I
first number:4
second number:5
third number:6
c is biggest of three
#case II
first number:6
second number:5
third number:4
a is biggest of three
#case III
first number:4
second number:6
third number:5
b is biggest of three
#case IV
first number:5
second number:6
third number:4
b is biggest of three
Comment

python to find the biggest among 3 numbers

# Python program to find largest
# number in a list
 
# list of numbers
list1 = [10, 20, 4, 45, 99]
 
# sorting the list
list1.sort()
 
# printing the last element
print("Largest element is:", list1[-1])
Comment

PREVIOUS NEXT
Code Example
Python :: python datetime offset 
Python :: whatsapp online tracker python script 
Python :: python code to exe file 
Python :: python count array length 
Python :: norm in python 
Python :: ln in python 
Python :: cd in python 
Python :: how to get input from user in python with out press enter 
Python :: pandas convert column to datetime 
Python :: how yo import python lib 
Python :: python recursion save value 
Python :: data compression in python 
Python :: python list elements 
Python :: python 3 custom sort with compare 
Python :: sklearn support vector machine 
Python :: random.choice 
Python :: matplotlib log scale y axis base 
Python :: args kwargs python 
Python :: grouped bar chart matplotlib 
Python :: how to use cos in python 
Python :: pandas average every n rows 
Python :: python re compile 
Python :: check if array is empty python 
Python :: create pytorch zeros 
Python :: pyspark now 
Python :: spotipy currently playing 
Python :: finding path of a module in python 
Python :: change marker border color plotly 
Python :: how to concat on the basis of particular columns in pandas 
Python :: Django custome login 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =