Lets the user enter courses and prints them out correctly at the end Catches there being six courses and asks for one to delete Correctly deletes the chosen course Readable and well-formatted output Good use of functions o Split your phases, and your operations within each phase, into functions o Remember that you can pass and return lists just like anything else • Create an empty list of courses. • Prompt the user for a course they wish to enter, or to type "EXIT" if they wish to stop entering courses. • Add the course to the end of the list of courses. o If the list of courses is up to six, print out the list of courses with good formatting (one course per line, along with a list header), and ask them which one they want to drop. • Print a number next to each course, and ask for a number of the course to drop. For example, if the user wants to drop the first course entered, they should enter "1", and if they want to drop the last course entered, they should enter 6. • For both the printout and the user input you will need to convert between Python's zero-based list numbers and the one-based list numbers you present to the user! • Go back and ask for another course. • When the user finally types "EXIT", print out their list of courses with good formatting (as above), and stop. let the user enter a list of courses, but stop them if they enter a sixth and insist that they delete one. The result will be an interactive program - it will keep running until the user commands it to stop.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question
Python code. Please write your own code and use good use of functions. Thanks!
Lets the user enter courses and prints them out correctly at the end
Catches there being six courses and asks for one to delete
Correctly deletes the chosen course
Readable and well-formatted output
Good use of functions
o Split your phases, and your operations within each phase, into functions
o Remember that you can pass and return lists just like anything else
• Create an empty list of courses.
• Prompt the user for a course they wish to enter, or to type "EXIT" if they wish to stop entering courses.
• Add the course to the end of the list of courses.
o If the list of courses is up to six, print out the list of courses with good formatting (one course per line, along
with a list header), and ask them which one they want to drop.
• Print a number next to each course, and ask for a number of the course to drop. For example, if the user
wants to drop the first course entered, they should enter "1", and if they want to drop the last course
entered, they should enter 6.
· For both the printout and the user input you will need to convert between Python's zero-based list
numbers and the one-based list numbers you present to the user!
• Go back and ask for another course.
• When the user finally types "EXIT", print out their list of courses with good formatting (as above), and stop.
let the user enter a list of courses, but stop them if they enter a sixth and insist that
they delete one. The result will be an interactive program - it will keep running until the user commands it to stop.
Transcribed Image Text:Lets the user enter courses and prints them out correctly at the end Catches there being six courses and asks for one to delete Correctly deletes the chosen course Readable and well-formatted output Good use of functions o Split your phases, and your operations within each phase, into functions o Remember that you can pass and return lists just like anything else • Create an empty list of courses. • Prompt the user for a course they wish to enter, or to type "EXIT" if they wish to stop entering courses. • Add the course to the end of the list of courses. o If the list of courses is up to six, print out the list of courses with good formatting (one course per line, along with a list header), and ask them which one they want to drop. • Print a number next to each course, and ask for a number of the course to drop. For example, if the user wants to drop the first course entered, they should enter "1", and if they want to drop the last course entered, they should enter 6. · For both the printout and the user input you will need to convert between Python's zero-based list numbers and the one-based list numbers you present to the user! • Go back and ask for another course. • When the user finally types "EXIT", print out their list of courses with good formatting (as above), and stop. let the user enter a list of courses, but stop them if they enter a sixth and insist that they delete one. The result will be an interactive program - it will keep running until the user commands it to stop.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Lists
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning