Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Analyzing code samples, comparing more than 2 numbers

# Read three numbers.
number1 = int(input("Enter the first number: "))
number2 = int(input("Enter the second number: "))
number3 = int(input("Enter the third number: "))

# Check which one of the numbers is the greatest
# and pass it to the largest_number variable.

largest_number = max(number1, number2, number3)

# Print the result.
print("The largest number is:", largest_number)

#output:

Enter the first number: 55
Enter the second number: 96
Enter the third number: 2

The latgest number is:  96
---------------------------------  
Enter the first number: 8
Enter the second number: 3
Enter the third number: 101
  
The latgest number is:  101
---------------------------------  
Enter the first number: 556
Enter the second number: 6
Enter the third number: 82
  
The latgest number is:  556
Comment

PREVIOUS NEXT
Code Example
Python :: how to classify numbers in python 
Python :: how to get 2 values form a dictionary in python 
Python :: emi calculator python code 
Python :: sort python dictionary with values of list by index of first one 
Python :: djangorestframework install command 
Python :: python basic programs quadratic equation 
Python :: python return multiple value from a function using a dictionary 
Python :: python Access both key and value using iteritems() 
Python :: Random parola uretme 
Python :: python round function 
Python :: selenium restart browser python 
Python :: dataframe no names from file 
Python :: how to make a var in pycode 
Python :: how to run ewa requirement.txt file 
Python :: python + credit-german.csv + class 
Python :: voting classifier grid search 
Python :: how to do welcome in bubble letters in python 
Python :: how to delete blank rows from text file in spyder 
Python :: setup python in windows tikinter 
Python :: python print functoin 
Python :: mo.group() separated with spaces instead of commas python 
Python :: python local variable 
Python :: fancy index python 
Python :: plotly two y axis bar chart grouped 
Python :: latex new command with arguments 
Python :: accessing a specific slide using python 
Python :: rickroll on input IN PYTHON 
Python :: How to make colors.winapp in WindowsAP 
Python :: Extract columns of dataframe to make new dataframe 
Python :: function for getting the basic statistic of our Dataframe in one go 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =