Answer to Question #270976 in Python for Chiarra

Question #270976

The Big One

by CodeChum Admin

Remember that time when we've tried identifying the largest digit among the given integer? Well, let's take it to the next level, and figure out the same thing on arrays/lists!


Let's do this one more time!


Instructions:

  1. Create a variable that accepts a positive integer.
  2. Create an empty list. Then, using loops, add random integer values into the list one by one. The number of values to be stored is dependent on the inputted positive integer given in the first instruction.
  3. Print out the largest integer among all the elements on the list, by any means necessary.

Input

The first line contains the size of the array/list.

The next lines contains an integer on each.

5
5
34
3
23
10

Output

A line containing an integer.

34
1
Expert's answer
2021-11-26T07:08:57-0500
import randomnumber = int(input('Enter the size of list:'))list = []for i in range(0,number):	n = random.randint(1,100)	list.append(n)print(*list, sep= '\n')print(max(list))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS