About 885,000 results
Open links in new tab
  1. python - Write a program that asks the user to type in 5 numbers

    You could solve it by doing the input in a loop and then use the builtin min and max function to display the largest and smallest: It seems you need a while loop, in that case just use a …

  2. Python Program to Find Largest Number in a List

    Oct 21, 2024 · Python provides a built-in max () function that returns the largest item in a list or any iterable. The time complexity of this approach is O (n) as it traverses through all elements …

  3. How to Find the Largest and Smallest Numbers in Python? - Python

    Aug 29, 2024 · To find the largest and smallest number in a list in Python, you can use the built-in functions max() and min(). For example, if you have a list numbers = [3, 1, 4, 1, 5, 9, 2], you …

  4. [Coursera] Python for everybody 5.2 Assignment · GitHub

    jennyonjourney / 5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If …

  5. Write a program that prints the minimum and maximum of five numbers ...

    x = int(input("Enter the number: ")) if a == 0: smallest = largest = x. if(x < smallest): . smallest = x. if(x > largest): largest = x. The first ‘if’ loop will assign the first value entered by the user to the …

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

    Learn about python program to find largest among N numbers with examples using sorted(), max() and reduce() methods to find maximum number

  7. Write A Python Program To Accept 5 Numbers From The User

    In this video you will learn about how to Write A Python Program To Accept 5 Numbers From The User And Find The Biggest Of The 5 Python Scripts ========================...

  8. Finding the Largest Number of user Inputs in Python

    Jul 16, 2024 · In this article, we will solve a simple problem: finding the largest number among five user inputs without using Python’s built-in max() function. This exercise will help you …

  9. python - Find largest number from user input - Stack Overflow

    May 6, 2015 · I trying to make a code which print largest and smallest number from user input. I want that user can input the number until there is ValueError. I have tried something like this: if …

  10. Prompt user for some numbers, then print the max and min

    Oct 7, 2016 · The function of this program is repeatedly prompting a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the …

  11. Some results have been removed
Refresh