boy in green shirt
Photo by CDC on Pexels.com

[Class Report] Introduction to System Development – Week 3: “What If?” — Creating Thoughtful Programs with Conditional Branching

We’ve entered the third week of our programming course. This week’s theme is conditional branching (if statements). Building on the variables and calculations we learned in previous weeks, we took a step into more practical territory with the concept of “changing behavior based on different situations.”


■ Teacher’s Introduction: “Let the Computer Decide”

Mr. Tanaka: “This is the point where your program evolves from a simple calculator into an intelligent system.”

The example written on the board was very simple:

score = 85

if score >= 80:
    print("Pass")

Mr. Tanaka: “This code means, ‘If the score is 80 or above, display ‘Pass.’”

This was the moment when students began to sense that programming could go beyond just writing commands—it could start “thinking.”


■ Exercise 1: Let’s Try Writing a Simple if Statement!

In the first exercise, students created a program that displays either “Pass” or “Fail” based on the score value.

score = 65

if score >= 70:
    print("Pass")
else:
    print("Fail")

Student A: “Whoa, this is just like a real test!”
Student B: “Changing the score changes the result! This is fun!”


■ Exercise 2: Let’s Handle Multiple Conditions!

Next, students used elif (else if) to create a grading program with multiple conditions.

score = 92

if score >= 90:
    print("S Rank")
elif score >= 70:
    print("A Rank")
elif score >= 50:
    print("B Rank")
else:
    print("C Rank")

Student C: “It feels like a ranking system in games—so cool!”
Student D: “Does elif mean ‘if it’s something else’? I’m not good at English, but I think I can remember this.”


■ Quiet Time: Finding Real-Life “What If” Scenarios!

In the latter half of the class, students worked on converting real-life decision-making examples into code.

💡 Sample Challenges:

  • If the weather is “sunny,” then “do laundry,” otherwise “dry indoors”
  • If body temperature is 37.5°C or higher, then “stay home,” otherwise “attend school”
  • If age is 20 or above, then “alcohol OK,” if under, then “No”

Student E: “Sensei, I turned my mom’s household rules into a program (lol)”
Mr. Tanaka: “That’s super realistic—nice work!”


■ Teacher’s Final Words

“When you learn conditional branching, it feels like your program starts to think for itself. Things are going to get even more fun from here on.”


■ Next Week’s Preview: Into the World of Loops

Next time, we’ll dive into loops, where we learn how to instruct computers to repeat tasks—something they’re especially good at. Look forward to it!


Our first-year high school students are gradually gaining the power to “think” through code. The joy of shaping their own logic is beginning to bloom.

By greeden

Leave a Reply

Your email address will not be published. Required fields are marked *

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)