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 :: how to check if an object of a certain type python 
Python :: conda environment 
Python :: How to install pandas-profiling 
Python :: assign multiline string to variable in python 
Python :: how to use turtle in python in python 3.9 
Python :: delete migrations django and start over deployment heroku 
Python :: get root path python 
Python :: convert all items in list to string python 
Python :: python code to generate fibonacci series 
Python :: discord.py how to print audit logs 
Python :: python list divide 
Python :: import qq plot 
Python :: python regular expression remove numbers 
Python :: find the time of our execution in vscode 
Python :: how to print answer 2 decimal places in python 3 
Python :: blender 2.8 python set active object 
Python :: colab version python 
Python :: default flask app 
Python :: python timestamp to yyyy-mm-dd 
Python :: non-integer arg 1 for randrange() 
Python :: check all values in dictionary python 
Python :: get current module name python 
Python :: dataframe KeyError: 
Python :: split pandas row into multiple rows 
Python :: numpy vector multiplication 
Python :: python location 
Python :: python read file from same directory 
Python :: calculate distance in python 
Python :: Image Watermarking in python 
Python :: string count substring occurences pytohn 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =