write a python program to read 10 numbers from the user and print the largest number
pls send easy method and as soon as possible
Answers
Answered by
0
Answer:
Approach :
- Read input number asking for length of the list using input() or raw_input() .
- Initialise an empty list lst = [] .
- Read each number using a for loop .
- In the for loop append each number to the list.
- Now we use predefined function max() to find the largest element in a list
Answered by
0
Answer:
# Python program to find largest
# number in a list
# list of numbers
list1 = [10, 20, 4, 45, 99]
# sorting the list
list1.sort()
# printing the last element
print("Largest element is:", list1[-1])
Similar questions
Business Studies,
4 months ago
English,
9 months ago
Science,
1 year ago
Social Sciences,
1 year ago