Assignment: Understanding 'if' Statements

Created by

Katarina Veljkovic

From

Polytechnical school

Outline

I created a short film demonstrating the understanding of some element of the basics of programming in C# such as conditional structure. In this lesson I will demonstrate if statements to my students.

Through the simplest examples of life, such as crossing the street, or making pancakes, the students understands the need for using the if statement. Also, they realize that all in programming, can and is applied in everyday life.

  • Crossing the street

In this lesson I demonstrated the traffic light. How does pedestrians behavewhen the red light is on, and what  happened when the green light is on.

  • Making pancakes

Second example of using the if command, is demonstrated through the example of making pancakes. If statement we can use whether the user will make a sweet or savory pancakes and also, what is the quantity of flour and water needed to make great pancakes.

Finally, I made the code written in C# that demonstrates the work of traffic lights, and showed the final presentation of the program, in the executable form.

Suitability

  • Ages 15-18
  • Computers