Answered You can hire a professional tutor to get the answer.

QUESTION

Below is the question and my answer but it's not working. Where in the coding did I go wrong?

Below is the question and my answer but it's not working.  Where in the coding did I go wrong?   Please see below.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.

#python program for tracking of the current members using list

# modules for operations

def add():# Add a new memberm=input("enter member name want to add?");m=str(m);mylist.append(m);def display():# Print the current member list.print "Printing the current member list:";for x in mylist:print xdef rm(k):# Remove a memberdel mylist[k-1];def mod(k):# Modify an existing memberm=input("enter member name want to modify?");mylist[k-1]=m;mylist = []ch = 1while ch :#many number of times to choose option

# main menu to  choose optionprint "MAIN MENUn1.Add a new member. n2.Remove a member.n3.Modify an existing member.n4.Print the current member list.n5.Exit the programnChoose option which operation do you want?"ch=input();if ch==1 :add();elif ch==2:m=input("enter position of member want to remove?");rm(m);elif ch==3:m=input("enter position of member want to modify?");mod(m);elif ch==4:display();elif ch==5:print "program exiting";exit();# exit the programelse:print "Try again";

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question