Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python see if a number is greater than other

# Python program to find the largest number among the three input numbers
# take three numbers from user
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
num3 = float(input("Enter third number: "))
 
if (num1 > num2) and (num1 > num3):
   largest = num1
elif (num2 > num1) and (num2 > num3):
   largest = num2
else:
   largest = num3
 
print("The largest number is",largest)
Comment

python if greater than and less than

if 10 < a < 20:
    whatever
Comment

PREVIOUS NEXT
Code Example
Python :: run python script every hour 
Python :: find max value in list python 
Python :: python formdata requests 
Python :: python array scalar multiplication 
Python :: match python 
Python :: python create a grid of points 
Python :: how to create an entry box on tkinter python 
Python :: seaborn Using the dark theme python 
Python :: cardano 
Python :: print A to z vy using loop in python 
Python :: get last 3 things in a list python 
Python :: decimal to octal in python 
Python :: np.select with multiple conditions 
Python :: check if string contains python 
Python :: array of numbers 
Python :: count occurrence in array python 
Python :: python simple web app 
Python :: numpy divide with exception 
Python :: how to take multiple line input in python 
Python :: get tweet by its id 
Python :: fetch data from excel in python 
Python :: alpha vantage import 
Python :: delete cell in jupyter notebook 
Python :: python ufeff 
Python :: filter a pandas dataframe by length of list in a column 
Python :: Python NumPy repeat Function Example 
Python :: python documentation 
Python :: create custom exception python 
Python :: while true python 
Python :: extract text from pdf python 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =