Challenge: Make a Scale

Make a scale that will map courses to their timings.

Problem statement

The tasks in this challenge are as follows:

  • Select a suitable scale for a given task.
  • Map different courses to specific timings using a selected scale.

Given data

We have four courses that will be mapped to four timings.

courses=['History','Mathematics','Philosophy','Computer Science']
timings=['8-9','9-10','11-12','12-13']

Expected output

If we give History as input to the scale, it should give 8-9 as output. For example:

console.log(c_scale('Mathematics'))

It should show 9-10 on the console screen, where c_scale is the scale created by the user.

Coding exercise

This problem is designed to check your understanding, so you are encouraged to solve it on your own. If you are completely stuck then refer to the next lesson which will explain the solution in detail.

Get hands-on with 1200+ tech skills courses.