0% found this document useful (0 votes)
29 views

Lab Exercise - Python Basics

The document outlines Python exercises for different groups involving accepting user input of numbers, creating lists and dictionaries from lists, searching and replacing items in lists, counting item occurrences, and analyzing student test score data.

Uploaded by

Lesley Maore
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Lab Exercise - Python Basics

The document outlines Python exercises for different groups involving accepting user input of numbers, creating lists and dictionaries from lists, searching and replacing items in lists, counting item occurrences, and analyzing student test score data.

Uploaded by

Lesley Maore
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Lab Exercise – Review of Python Basics

All Groups

• Write a python program that is used to accept five numbers from a user and find the average of
the even or odd numbers only. Include separate functions for calculations of the even and odd
numbers. It should find out if the user wants to view the results of the even or odd numbers. At
the end the program should give the user an opportunity to provide another set of numbers or
terminate the program.

Group 1 & 4

 Write a python program that reads data from a list with five numbers and creates a second list
with the odd numbers of the first list only.

 Write a python program that contains the names of 5 students in one list and their numbers in a
second list. The program should read the two lists and store them in a dictionary

Group 2 & 5

 Write a python program that stores the names of five student in a list. It should be able to
search for any name that the user supplies and replace it with a new name that the user
supplies.

 Write a python program that contains the names of 5 students and their numbers in a
dictionary. It should allow you to insert the details of a new student in the correct alphabetic
position

Group 3 & 6

 Write a python program that identifies how many times an item occurs in a list and displays this
number

 Write a python program that contains the names of 5 students and the scores of two tests in a
dictionary. The program should display the student with:

a) An average above 50%

b) The highest average.

You might also like