In this challenge, you are tasked with writing Scala code that starts with a list of 10 numbers representing the numeric grade for 10 students on a recent test. Try to print out each value with an associated letter grade and then print the class average.
- Are you ready for your next challenge?…In this challenge, we're going to write Scala code…that starts with a list of 10 numbers,…representing the numeric grades for 10 students…on a recent test.…You'll loop through each of the grades…and evaluate the grade and print out a letter grade…for each of the scores.…You'll also calculate the average of all the grades.…Here is the scale for the letter grades.…93 to 100 is an A, 86 to 92 should be a B,…77 to 85 is a C,…69 to 76 is a D,…and, finally, anything below 69 is failing.…
A sample project is included in your Exercise Files folder…under 02_07 that can be opened in the Scala IDE.…Or, if you choose, you can start from scratch…using a text editor or the Scala interpreter.…I'm estimating that this challenge should take…about 10 minutes.…When you're done, come back and check out my solution…and I will walk you through my thought process…along the way.…
- Installing Scala
- Integrating with IDEs
- Creating variables
- Using special functions
- Basic types and operations
- Tuples, sets, maps, arrays, and lists
- Classes, fields, and methods
- Singleton objects
Skill Level Intermediate
1. Why Scala?
2. Scala Basics
3. More Scala Basics
4. Objects with Scala
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.