Question
Refer to the following two lists for this question: List A: 23,2,3,42,3,6 List B: 5,3,6,3,9 Write the codes: a) to identify the position of integer
Refer to the following two lists for this question: List A: 23,2,3,42,3,6 List B: 5,3,6,3,9
Write the codes:
a) to identify the position of integer "42" from the list A. (5 marks)
b) to display the occurrences of each integer from list A. (8 marks)
c) to perform an average of the numbers in List A. (2 marks)
d) to perform an average of the numbers in List B. (2 marks)
e) to compare both average of list A and list B. If average value of list A is less than the one from list B, display a message error "An error happens as list A is larger than list B". (3 marks)
f) to compare list A with list B, to identify common integers and list them on the screen. (5 marks
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