27/03/2023 4:04 am
Topic starter
Notifications
Clear all
How to find the largest and smallest number in an array?
0
How to find the largest and smallest number in an array?
Answer
Add a comment
Add a comment
1 Answer
0
27/03/2023 7:34 am
Here is an example of how to find the largest and smallest number in an array in Python:
numbers = [3, 8, 2, 5, 1, 9] largest = max(numbers) smallest = min(numbers) print("The largest number is:", largest) print("The smallest number is:", smallest)
Add a comment
Add a comment
Forum Information
- 14 Forums
- 1,837 Topics
- 5,053 Posts
- 0 Online
- 1,079 Members
Our newest member: Tyronenodub
Latest Post: loli
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed