Knowledge Check!

Here’s a summary of what we learned in this lesson:

  1. About the concept of Variables for representing ‘data’ in our programs.
  2. About ‘int’ and ‘float’ variable types for numbers.
  3. About ‘boolean’ aka ‘bool’ variables for true/false values.
  4. About operators: + (add), - (subtract), *(multiply), and / (divivde)
  5. Putting it all together into a ‘madlib’ program

Class Discussion

  1. What is a variable in C# and why is it important?
    • This question should encourage students to discuss the role of a program having ‘memory’
  2. Can you give examples of when you might use an ‘int’ variable? How about a ‘bool’?
    • This is a fun question for students, take some time and let them imagine how to represent different type of of real-world values using these types
  3. What is an operator in the context of programming and can you give examples of some common operators?

  4. What does the Console.ReadLine() function do and how might you use it in a program?

  5. How did we use variables in our Madlib project?

  6. Why is it important to choose the correct variable type for the data you want to store?

  7. What happens if you try to perform an operation with incompatible variable types (like adding a string and an int)?
    • This is a tricky question because the results can depend on the types used in an expression. Ecourage students to try it and find an answer to the question in the class!*