About 5,950,000 results
Open links in new tab
  1. python - Find greatest number entered by four users - Stack Overflow

    May 11, 2021 · nums[i+1] = int(input(f"Enter number {i+1}: ")) if v == max(nums.values()): print(f"Number {k} is greater") break. #Store all numbers in list. #Lets say your numbers are …

  2. Python Program Maximum Of Four - GeeksforGeeks

    Feb 29, 2024 · The task of finding the maximum of three numbers in Python involves comparing three input values and determining the largest among them using various techniques. For …

  3. Python Program to Find Largest Number in a List

    Oct 21, 2024 · Finding the largest number in a list is a common task in Python. There are multiple way to do but the simplest way to find the largest in a list is by using Python’s built-in max () …

  4. Using If-Else ladder to find greatest of four numbers entered

    Oct 17, 2021 · The idea is to add the user input to a list and use max to find the max. lst = [] for i in range(0,4): x = int(input("enter a number:")) lst.append(x) print(max(lst))

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

    a = [1,2,3,4,6,7,99,88,999] max_num = 0 for i in a: if i > max_num: max_num = i print(max_num) Also if you want to find the index of the resulting max, print(a.index(max_num)) Direct …

  6. Python Program to Find Largest of 4 Numbers - Quick …

    The following python program uses the built-in function max() to find the largest of 4 numbers. The max function can take any number of arguments and hence can be used to find maximum of 3 …

  7. Python program to find largest of 4 numbers using if else

    Jan 13, 2023 · The program uses if-else statements to compare the numbers and find the largest one. It compares the first number with the second, third, and fourth numbers using if …

  8. Greatest Among Four Numbers In Python - CopyAssignment

    Nov 15, 2022 · Code for the greatest among four numbers in Python: n = 4 list_of_numbers = [] for i in range(n): list_of_numbers.append(int(input(f"Enter {i+1}th number: "))) max_number = …

  9. Python Program to Find Largest among N numbers - Tutorialwing

    The task is to find the maximum number among N given numbers using python program. For example, If a = 4.1, b = 6.3, c = 6.7 and d = 7.4, then output should be d = 7.4. We can do it in …

  10. 6 ways to find the largest number in a python list.

    Oct 11, 2021 · numbers_lst = [1, 2, 3, 4, 50, 6, 3, 2, 3, 8] # 1- Fast approach using built in max function print (" Using Max Built-in function: ", max (numbers_lst)) # 2- Manual Approach …

Refresh