Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercise 3 : Name your program Lab 1 1 _ ex 3 _ Id . py Write a program that reads values from the keyboard
Exercise : Name your program LabexIdpy
Write a program that reads values from the keyboard and store them in a list. The program should then find the largest size of consecutive occurrence of the same number in the list. Output the list, the number and, the largest consecutive occurrence of the number. If many numbers have an equal
consecutive occurrence then the number having the largest occurrence will be the leftmost one. If you run your program with the following input data:
Your output should be as follows.
List:
The number is:
The largest size of consecutive numbers:
Your program should have at least these functions:
main: displays the list, the number and the largest consecutive occurrence
readData:reads data from the keyboard into a list
findLargestConsecutiveOccurence: takes the list of numbers and returns the number with the largest consecutive occurrence and the number of occurrence
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started