Answered step by step
Verified Expert Solution
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: enrollment. It should allow for a user to input any combination of caps or capslower case. ie 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 commentwith 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 enrolled
Biology enrolled
Art 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 week 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 ie 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 courses which start out at
LOOP times
Ask and read in a single enrollmentstore in a variable
IF the variable has the value of the first course
Add to the counter for the Programming course in the example above
ELSE IF the variable has the value of the second course
Add to the counter for the Biology course in the example above
ELSE IF the variable has the value of the third course
Add to the counter for the Art course 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started