##Scope
This project involves implementing the core functionality for a simple grading app. The objective of this project is for students to practice conditional logic using if/else
statements.
##Before Class
Students should only start this project after they have completed the other lessons in the unit.
See here for code
See here for code (private).
- Students will be assessed based on their performance on this project.
##During Class
###Do Now
- Volunteer takes attendance. Procedure found here.
- Students should complete the Do Now activity.
###Opening
If I got a 74 on the last test, what is my letter grade?
What is the minumum value I must get on a test to pass?
How are you, the human, able to detect this? How can we create a program that does the same thing?
Answer: With conditionals!
###Introduction to New Material ("I Do") You are going to create a program in which the user can type in a number grade and the program will tell them their grade.
At this point the teacher should demonstrate a working model of the solution code (private repo) to the class. Be sure to hide the URL of the solution code when displaying to class.
Open the Starter code link here.
Once you are looking at the code, go to File > Clone to create a new workspace for yourself.
Clearly instruct students not to alter the starter code.
Before telling the user the number grade that they received, lets start with simply letting them know if they passed or failed.
In the JavaScript file, create an if/else statement that alerts a message to the user that reads:
You got a [number > 65]. Therefore you passed!
or
You got a [number < 65]. Therefore you failed
If the student is unable to create an alert box, they should be instructed to Google "javascript alert box"
After the pass condition is complete, the students must make a conditional statement that alerts the user with the letter grade they received. A, B, C, D or F
in a string.
Example: You got a 94. Therefore you got an A!
###Guided Practice ("We Do") ####Brainstorming Before you start coding, identify the list of steps you need to do to finish this project. Here's a start:
- What kind of conditional logic will you need? Write pseudo-code on paper using
if
andelse
statements.
###Independent Practice ("I Do")
It's build time! Students will work alone on this project. The teacher's role will be to walk around the room helping students with any questions they have. Students are encouraged to look at previous lessons for reference.
###Extension Activities Students who complete the project early may attempt to improve their project by including the following:
- Added CSS for visual customization
- Instead of alerting the user with their result, place the text below the input field.
Students who are eager for another project using conditionals are encouraged to create a High-Low Game.
###Closing Select students to present their work to the class.
###Check for Understanding Teachers should keep track of student success while they are presenting to the class.
###How to Submit Project
- The students must export this project as a Gist: File > Export as Gist
- Students must submit their Gist URL at the project submission link found in the header of the Daily Session Document.