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 function in C#, and why are they important in programming?

  2. Can you describe the structure of a function in C#?

  3. What does it mean for a function to ‘return’ a value, and why might this be useful?

  4. How do you ‘call’ a function in your code?

  5. What are function parameters, and how do they work?

  6. Can you give an example of a built-in function we used, and explain what it does?

  7. Why do you think functions are often used in programming instead of writing all code in a linear way?

  8. What was the most challenging part of writing your own functions?

  9. How can understanding and using functions make your code more efficient or easier to read?


Previous submodule: