2.2: Boolean Challenges
In this module we'll provide a few challenges for learning about and studying Booleans:
File Location
Right click on the solution you made in the first module
Go to Add > New Project and select Console App (.NET Framework)
Name it
0.02_Booleans_ChallengesWrite your code for this module within
Program.csof that project
Bronze Challenge
In addition to printing true if the value is less than 10, create another boolean expression that prints a message if value is greater than or equal 10.
Silver Challenge
using the variable: string password = "LetMeIn1234!";, check if the password is equal to LetMeIn1234!. If it is, send a message to the user that they are able to get in. If the password is wrong, send a message that something went wrong.
Gold Challenge
Create a conditional that prompts the user to enter a number from 1-5 to indicate how they're feeling. Print a string to the console based on the number that the user enters. For instance, if a user enters a 5, you might print a response that says something like this: "Great to hear that you're feeling so good!"
Answers Answer to Challenges
Next: Conditionals
Last updated