Programming Essentials Task Sports Team Management Assignment

User Generated

ubzrjbexpbafhgyvat

Computer Science

Description

Programming Essentials

Team Management

You are in charge of managing a local softball team, one in which there is a lot of turnover. While you have a couple of regulars, much of the team members come and go frequently. When it comes to organizing games, it is becoming more and more difficult to keep track of the current members, so you decide to write a small program to help you track the current players.

Write a modularized program that will utilize a main menu to control the program’s functions and a list to store the members of your team. The following functions that your program needs to include:

  • Print the current member list.
  • Add a new member.
  • Remove a member.
  • Modify an existing member.
  • Exit the program

Remeber that you can create a function using 'def.' In other words, for adding a new member, you will need a function similar to: def aaddmember.

Note: Since we have not covered File Access, do not worry about long term storage for your list. Each time you run the program, you will have to create a new list. You are welcome to skip ahead to the File I/O if you would like to tackle this additional functionality, but file access is NOT required for this assignment.

For this project:

  • You will submit your python code in either the original .py file, or copied into a .txtfile.
  • A screenshot of your code having been executed (run). How to Take a Screenshot.

Tips: The menu logic will use the same structure as your previous programs. A single variables will be used as the control value, and based on what the user entered as the control value, will determine the course of action taken inside of the loop.

Example output:

C:\>python week4.py

Welcome to the Team Manager

===========Main Menu===========

1. Display Team Roster.

2. Add Member.

3. Remove Member.

4. Edit Member.

9. Exit Program.

Selection> 2

Enter new member's name: Nathan

===========Main Menu===========

1. Display Team Roster.

2. Add Member.

3. Remove Member.

4. Edit Member.

9. Exit Program.

Selection> 2

Enter new member's name: Toby

===========Main Menu===========

1. Display Team Roster.

2. Add Member.

3. Remove Member.

4. Edit Member.

9. Exit Program.

Selection> 1

Nathan

Toby

===========Main Menu===========

1. Display Team Roster.

2. Add Member.

3. Remove Member.

4. Edit Member.

9. Exit Program.

Selection> 3

Enter member name to be removed: Toby

===========Main Menu===========

1. Display Team Roster.

2. Add Member.

3. Remove Member.

4. Edit Member.

9. Exit Program.

Selection> 1

Nathan

===========Main Menu===========

1. Display Team Roster.

2. Add Member.

3. Remove Member.

4. Edit Member.

9. Exit Program.

Selection> 4

Enter the name of the memeber you want to edit: Nathan

Enter the new name of the member: Nathan Braun

===========Main Menu===========

1. Display Team Roster.

2. Add Member.

3. Remove Member.

4. Edit Member.

9. Exit Program.

Selection> 1

Nathan Braun

===========Main Menu===========

1. Display Team Roster.

2. Add Member.

3. Remove Member.

4. Edit Member.

9. Exit Program.

Selection> 9

Exiting Program...

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Attached.
Attached.

#implement the method print member to print the list of names
def printmember(namelist):
current = 0
if len (namelist) > 0:
while current < len(namelist):
print(current,".",namelist[current])
current = current + 1
else:
print("List is empty")
return
#implement the method add the member in the list
def addmember(namelist):
name = input ("Type in a name to add: ")
namelist.append (name)
return
#implement the method delete member in the list
def deletename(namelist):
del_name = input("What name would you like to remove?")
if del_name in namelist:
item_number = namelist.index(del_name)
del namelist [item_number]
else:
pr...


Anonymous
Just what I needed…Fantastic!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags