0% found this document useful (0 votes)
4 views3 pages

CPE001L Laboratory Task 3 Manual

This laboratory exercise focuses on decision programming structures, teaching students to apply relational and logical operators for selection expressions and statements in Python. Students are required to create programs based on provided problems, submit their code and outputs via cloud storage, and adhere to a checklist for grading. The exercise emphasizes the importance of conditional execution in programming for achieving flexible and logical outcomes.

Uploaded by

lucianogeom05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

CPE001L Laboratory Task 3 Manual

This laboratory exercise focuses on decision programming structures, teaching students to apply relational and logical operators for selection expressions and statements in Python. Students are required to create programs based on provided problems, submit their code and outputs via cloud storage, and adhere to a checklist for grading. The exercise emphasizes the importance of conditional execution in programming for achieving flexible and logical outcomes.

Uploaded by

lucianogeom05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Laboratory Exercise 3

DECISION PROGRAMMING STRUCTURES


Name: Date:
Program: Section:

Objectives:

This laboratory exercise aims to equip students with the ability to:

1. Apply relational and logical operators to construct selection expressions.


2. Use selection statements to make choices in a program.

Materials:

 Computer with Mac or Microsoft Windows operating system installed.


 Python, is a programming language. To download go to https://www.python.org/downloads/ and
PyCharm, is a powerful IDE that makes developing Python code easier. To download go to
https://www.jetbrains.com/pycharm/download/?section=mac.
 Microsoft Word
 One Drive or GDrive
 BlackBoard Learn LMS

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.

Checklist for grading:

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:

Laboratory Exercise 3-word document


Attach here the full-size Screenshot of the outputs (Source code and Output)
.py files
Save all mentioned output on your One Drive folder > Week 5 and submit the folder’s link on BBL.

Problem 1

_________________________________________________________________________________________
CPE001L Computer Fundamentals and Programming 1 (Laboratory)
College of Engineering and Architecture Page | 2
Laboratory Exercise 3
DECISION PROGRAMMING STRUCTURES

Findings and Observations:

_________________________________________________________________________________________
CPE001L Computer Fundamentals and Programming 1 (Laboratory)
College of Engineering and Architecture Page | 3

You might also like