Welcome back to Software Development A Friendly Reminder
Welcome back to Software Development!
A Friendly Reminder…
A Friendly Reminder… No surfing
A Friendly Reminder… No surfing
A Friendly Reminder… No surfing gaming No
A Friendly Reminder… No surfing gaming No
The While Loop
The While Loop while ( some condition is true ) { do a bunch of stuff somehow condition becomes false }
The While Loop while ( some condition is true ) { do a bunch of stuff somehow condition becomes false }
The While Loop while ( some condition is true ) { do a bunch of stuff somehow condition becomes false }
Bool Variables
Bool Variables • Variables that hold the value true or false
Bool Variables • Variables that hold the value true or false • They do not hold numbers
Bool Variable Example
Bool Variable Example bool entered. Right. Answer;
Bool Variable Example bool entered. Right. Answer; entered. Right. Answer = false;
Bool Variable Example bool entered. Right. Answer; entered. Right. Answer = false; …
Bool Variable Example bool entered. Right. Answer; entered. Right. Answer = false; … if (entered. Right. Answer == true )
Bool Variable Example bool entered. Right. Answer; entered. Right. Answer = false; … if (entered. Right. Answer)
Bool Variable Example bool entered. Right. Answer; entered. Right. Answer = false; … if (entered. Right. Answer) { Console. Write. Line(“Good job! That was a hard one!”); }
Your Task
Your Task • Fix your Math. Game program so that the user must enter a number.
Clear and Unclear Windows Clear Unclear
- Slides: 23