W03 Code-along Activity: Grade Calculator Program
Code-along Activity Overview
For this activity, you will code along with an instructor video that walks you through each step of the activity below. Make sure that you pause the video, or watch sections over if you need to, so that you are able to complete the entire activity.
Your instructor will post a link to the video in Microsoft Teams.
Program Requirements
Write a program that determines the letter grade for a course according to the following scale:
A >= 90
B >= 80
C >= 70
D >= 60
F < 60
Also, display a message to the user telling them if they passed the course or not (passing the course requires at least 70%).
Enhancement
Add to your code the ability to include a "+" or "-" next to the letter grade, such as B+ or A-. For each grade, you'll know it is a "+" if the last digit is >= 7. You'll know it is a minus if the last digit is < 3 and otherwise it has no sign. Also, keep in mind, there is no A+ and no F+ or F- grades.
Instructions
Find the video that your instructor has posted for this assignment and code along with them for each of the following steps.
Please work through the requirements in order with the instructor rather than jumping ahead to more complicated steps, to ensure that you are understanding the fundamental concepts.
Sample Solution
In addition to the instructor video, you can also view this sample solution. (This solution may be slightly different than the final code that you and your instructor created.)
Alternative Video Link
In addition to the link that your instructor posted, you are also welcome to watch the following code walkthrough or use its transcript:
- Grade Calculator Code-along Video (29 minutes)
Submission
Please pause and re-watch any sections of the instructor video necessary until you have completed the entire activity and your program runs the same as the instructor's. When you are finished:
- Return to Canvas to report on your activity.
Up Next
- W03 Project: Adventure Game
Other Links:
- Return to: Week Overview | Course Home