Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function called biggest() that takes a list of integers (data) and returns a new list of integers (of length 2). The first number

image text in transcribed

Write a function called biggest() that takes a list of integers (data) and returns a new list of integers (of length 2). The first number in the returned list is the biggest number in the input list. The second number is the number of times that the this biggest number appears in the input list. The function is called as follows: biggest (data) Use the name shown above for the input parameter. The input list will always have at least one number in it. For full marks, your function must use a for loop. You can use a while loop to receive partial/most marks for this problem. Do NOT use any built-in functions or modules that find the largest number for you (like the max() function). For example, (highlight shows the biggest numbers in the input) >>> biggest ( [1,1,12,11,12,11,12,-1,-2,8,2] ) [12,3] >>> biggest ( [9] ) [9,1] Do NOT use any built-in functions or modules that find the largest number for you (like the max() functions)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions