CPE001L Laboratory Task 3 Manual
CPE001L Laboratory Task 3 Manual
Objectives:
This laboratory exercise aims to equip students with the ability to:
Materials:
Basic Principles:
Decision or Selection programming structure executes code conditionally based on a True or False
statement. This allows the computer to make choices and follow paths depending on the result of the
conditions. Conditions – are statements that involve comparison using relational and logical operators that
evaluate to either True or False. Consequences – block of code to be executed if the condition is true and
Alternative – if there is an option block of code to be executed if the condition is false. By combining these
elements, programs can achieve different outcomes based on the evaluation of the condition. This is
fundamental for adding flexibility and logic to any program.
Instructions:
Using Python, PyCharm, or any IDE for Python programming language, create the program
problems below then submit the link from the cloud storage (OneDrive or GDrive) of the following
files: .py files, screenshots of the output, and/or video recording for offline students (screen + open
camera).
Problem :
_________________________________________________________________________________________
CPE001L Computer Fundamentals and Programming 1 (Laboratory)
College of Engineering and Architecture Page | 1
Laboratory Exercise 3
DECISION PROGRAMMING STRUCTURES
Sample Input 0
Car
Red
Sample Output 0
The toll charge for Car travelling 50.0 kilometers is 25.0 pesos.
Sample Input 1
Bus
Orange
Sample Output 1
The toll charge for Bus travelling 75.0 kilometers is 75.0 pesos.
1. Submitted link with one.py file and three screenshots for each triangle type.
2. Correct declaration of variables and data types.
3. Correct decision of instructions.
4. Correct output.
5. No logical and syntax errors.
6. Findings and Observation
================================================================================
Output:
Problem 1
_________________________________________________________________________________________
CPE001L Computer Fundamentals and Programming 1 (Laboratory)
College of Engineering and Architecture Page | 2
Laboratory Exercise 3
DECISION PROGRAMMING STRUCTURES
_________________________________________________________________________________________
CPE001L Computer Fundamentals and Programming 1 (Laboratory)
College of Engineering and Architecture Page | 3