About 1,110,000 results
Open links in new tab
  1. Greatest of Two Numbers using Python - PrepInsta

    In this method we’ll use Ternary Operator in Python to find the Largest Number among the two input integers. Check if num1>num2 using ternary operator in python. print num1 if true or …

  2. How do I find the maximum (larger, greater) of 2 numbers?

    You can use max(value, run) The function max takes any number of arguments, or (alternatively) an iterable, and returns the maximum value.

  3. python - Find greater number of two numbers using function - Stack Overflow

    May 1, 2021 · return str(n1)+" is greater than "+str(n2) if n1>n2 else str(n2)+" is greater than "+str(n1) The reason is, the input function produces a string value. So changed the code to …

  4. Find Greatest Of Two Numbers In Python

    Jun 5, 2023 · To find the greatest of multiple numbers, you can modify the methods by either using nested if-else statements or by utilizing the max () function with multiple arguments. For …

  5. Python Program to find Maximum of Two Numbers With …

    We can write python program to find largest of two numbers using max() method as shown below – num1 = float(input("Enter the first number: ")) num2 = float(input("Enter the second number: …

  6. Python Program to Find Largest of Two Numbers - CodesCracker

    Python Program to Find Largest of Two Numbers. This article is created to cover some programs in Python, that find and prints largest or greatest between two numbers entered by user. Here …

  7. python - Find the greatest (largest, maximum) number in a list of ...

    Mar 8, 2023 · max is a builtin function in python, which is used to get max value from a sequence, i.e (list, tuple, set, etc..) #Ask for number input. #create a list for variables. eighth, ninth, tenth] …

  8. Python program to find largest of 2 numbers | Example code

    Dec 17, 2021 · To write a program to find the largest of 2 numbers use the if-else statement in Python, You have to compare two numbers using the if-else statement and will print the …

  9. Greatest of Two Numbers in Python: Simple Program

    Use the max() function to find the larger of the two numbers. Print the result. This approach relies on conditional statements to compare two numbers. Get two integer inputs from the user. …

  10. Python Program to find Largest of Two Numbers - Tutorial …

    In this article, we show How to write a Python program to find the largest of Two Numbers using the elif Statement and Nested If statement.

  11. Some results have been removed
Refresh