Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are going to create an enrollment program that tracks courses, total enrollment, and determines the most popular course. Instructions Create an enrollment program that

You are going to create an enrollment program that tracks courses, total enrollment, and determines the most popular course.
Instructions
Create an enrollment program that accepts input from the user and outputs the most popular course.
Input: 10 enrollment. It should allow for a user to input any combination of caps or caps+lower case. i.e. Programming, pRograMMing, programming, etc.
Output: Print the total enrollment as well as the most popular course. Display all courses when there is a tie.
Make sure to provide your output as a block comment(with triple quotes) at the very bottom of your main.py
Example Output
Below is an example program output. In the example, user input is underlined and highlighted.
Welcome to Shreline Community College Registration program.
SCC courses for Fall: Programming, Biology, Art
Enroll: Programming
Enroll: Programming
Enroll: Biology
Enroll: Art
Enroll: Art
Enroll: Art
Enroll: Programming
Enroll: Biology
Enroll: Art
Enroll: Biology
REGISTRATION RESULTS....
Programming -3 enrolled
Biology -3 enrolled
Art -4 enrolled
The most popular course is : Art!
Pseudocode
Pseudocode is a way that we write the algorithm for solving a problem in plain English before we start coding, and we learned Pseudocode in week1. We do this to work through the logical parts of the program as much as possible. We will inevitably have to make some corrections, but it is good practice to write pseudocode at the start of a new problem.
So, in this assignment, you are going to start leveraging pseudocode. I will tell you how to solve the problem in English (i.e., pseudocode), and you will convert it to code.
Later on, you're going to practice writing your own pseudocode and use it to collaborate with others before you convert to code over time. Here's some Pseudocode for the enrollment problem.
Print the intro
Make counter variables for the 3 courses which start out at 0
LOOP 10 times
Ask and read in a single enrollment(store in a variable)
IF the variable has the value of the first course
Add 1 to the counter for the Programming course (3 in the example above)
ELSE IF the variable has the value of the second course
Add 1 to the counter for the Biology course(3 in the example above)
ELSE IF the variable has the value of the third course
Add 1 to the counter for the Art course(4 in the example above)
END LOOP
Print out a summary of the class registration using the counter variables
IF the Programming had the most enrollment
Print they are the most popular
ELSE IF the Biology had the most enrollment
Print they are the most popular
ELSE IF the Art had the most enrollment
Print they are the most popular

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

ISBN: 1844804526, 978-1844804528

Students also viewed these Databases questions