Lab Exercise - Python Basics
Lab Exercise - 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: