Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9000115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:16:11+00:00 2026-06-16T00:16:11+00:00

I have to create a program that will ask user to input details of

  • 0

I have to create a program that will ask user to input details of a student including their ID number (which is to be saved to a global list). Then the user will be returned to the main menu where they are asked to view add or delete.

I can do the adding a student, I have done view , I have created the class etc… but I cannot get it to delete. We have to delete a student we have added by entering their ID number and then after deletion the program must confirm who it has deleted.

def removeStudent():
    std_delete = raw_input("Please enter Students ID number to remove: ")
    for std in students:
        if std.studentID == std_delete:
            print "Student ID",std_delete,"has been deleted" % std.studentID
            students.remove(std)
            break
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:16:12+00:00Added an answer on June 16, 2026 at 12:16 am

    I think you are confuse how to delete a student instance

    std_delete = raw_input("Student To Delete")
    for std in students:
        if std.studentID == std_delete:
            print "Student ID %d has been deleted " % std.studentID
            students.remove(std)
            break
    

    or you may using filter function

    std_delete = raw_input("Student To Delete")
    students = filter(lambda x: x.studentID != std_delete, students)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a school assignment I have to create a C++ program that will create
I made an ATM program. I have a try catch that will ask for
I need to write a program, that will ask a user to enter a
I would like to create a dataset that will ask java program to read
I have to create a cipher program that shifts the letters of a message
I have a program that is used to create other program and compile it
I have a small program that I'm trying to create to get ip addresses
I am trying to create a program that will create a vector, generate 100
I want to be able to create a program that will take a list
I'm trying to create a desktop program that will interact with the online todo

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.