Chapter Table of Contents

Ch. 6 Conditionals

Section Table of Contents

Practice

Grade

Create a class called Grade. In the main method, prompt the user to enter a test score as a percent. Then, print out the letter grade that that score would receive.

💻 Template code

✅Solution code

Even or Odd?

Use the modulus operator (%) to check whether an inputted number is even or odd.

💻 Template code

✅ Solution code

Old Enough to Drive?

Create a program called Drive. It should do the following: