§ 02 — Integrative Programming and Technologies 1
Interactive programming involves creating programs that respond to user input or events, making applications more engaging. Unlike batch programs that run from start to finish automatically, interactive programs wait for the user and then do something, such as clicking a button or entering text. This course introduces fundamental concepts of programming and shows how technologies (like Python or web interfaces) can be integrated to build simple interactive applications. You will learn basic problem-solving and programming principles, preparing you for building practical projects.
Effective programming starts with problem solving. We break a problem into smaller steps before writing code. This often begins with defining the problem, understanding requirements, and then designing a solution algorithmically. An algorithm is a step-by-step procedure to solve a task. For example, to compute the sum of two numbers:
Using tools like flowcharts or pseudocode helps visualize these steps. A flowchart uses symbols (ovals for start/end, rectangles for actions, diamonds for decisions) to map logic. In this module, you'll learn to read and draw simple flowcharts to plan programs. Effective problem solving sets the foundation: before coding, outline your logic so the program follows a clear plan.
In this class we will use Python as our programming language. Python is easy-to-read and widely used in schools and industry. To start coding in Python, install a Python interpreter (like Python.org or use an online IDE). Writing a simple program can be as easy as:
print("Hello, Pilipinas!") # Displays text to the screen
This line uses print() to output text. Lines beginning with # are comments for humans and are ignored by Python. In class you will set up Python on your computer or use the provided lab computers. By the end of this module, you should be comfortable running a Python script and understanding how your code maps to the problem-solving plan.
Interactive programming combines logic, coding, and user interaction. In this module we introduced programming and problem solving, and got started with Python. Remember: always plan your program logic (flowchart or pseudocode) before writing code. Next, we will learn about the building blocks of Python programs: variables, data types, and how to get input/output from the user.
Ready to apply these ideas? The practice drills below include programming exercises and debugging tips — with a live coding playground.
Review Questions
print() function do in Python? Give an example.Worked Exam Problem
Problem: Write a simple Python program (in pseudocode or flowchart first) that asks the user for their name and then greets them by name.
Solution Steps
Step 1: Plan the Algorithm. We want to ask for a name and then say hello. The steps: Start → Input the user's name → Output a greeting that includes the name → End.
Step 2: Write Pseudocode.
START
OUTPUT "Enter your name: "
INPUT name
OUTPUT "Hello, " + name + "! Welcome to the class."
END
Step 3: Convert to Python.
name = input("Enter your name: ") # Get name from user
print("Hello, " + name + "! Welcome to the class.")
Step 4: Explain the Code. The input() function displays a prompt and reads text into the variable name. The print() then concatenates strings to greet the user.
Hands-On Exercise
Use the starter code to create a program that asks the user for two peso amounts (for example, price of goods), adds them together, and prints the total as a peso amount. Test your program with sample inputs.
How to Pass Tips
input() returns text). For numeric addition, ensure you convert to int or float if needed.print() shows output and input() takes user input.# Write a Python program that asks for two numbers
# (peso values from user input), adds them, and prints the result with a ₱ sign.
print("Interactive Sum Program")
# TODO: Prompt user for two numbers and print their sum.Free Sample
That was the free sample: 3 of 34 reviewers with answer keys in Integrative Programming and Technologies 1. Unlock the rest for the semester.
Unlock all reviewers →Done with this module? Track it — your progress shows on the subject list.
Studying with blockmates? Send them this lesson.
Up next
Lesson 2: Python Refresher — Variables and Data Types→