For this activity, create a new variable called language
. Then create a conditional that handles printing:
- Hola, Martin if language is equal to
"spanish"
- Salut, Martin if language is equal to
"french"
- Hello, Martin if language is equal to
"english"
- I am not sure what are you trying to do, sorry! 🍺 if language is equal to anything else.
Bonus: Use prompts to determine what language will be set to as well as the name that should be consoled.
Hint: For bonus part, you have to use repl.it with HTML, CSS and JS, instead only with JS.
Write a program that asks the user to enter a number between 0 and 100 (inclusive) and then displays a letter grade (A, B, C, D, or F) based on the following grading scale:
- A: 90-100
- B: 80-89
- C: 70-79
- D: 60-69
- F: 0-59
For example, if the user enters 95, the program should output "A"; if the user enters 72, the program should output "C".
To accomplish this, you can use an if statement. In the end, you can handle the case in which user inputs a number outside of the scope.