0% found this document useful (0 votes)
1 views2 pages

Midterm Act

The document outlines two programming problems using conditional statements in Python for a Computer Programming course. The first problem involves checking if a user's payment is sufficient for their purchases, while the second problem determines if a student has passed an entrance exam based on their score. Each problem includes a flowchart and pseudocode to illustrate the logic required for implementation.

Uploaded by

lta.fmmlopez
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)
1 views2 pages

Midterm Act

The document outlines two programming problems using conditional statements in Python for a Computer Programming course. The first problem involves checking if a user's payment is sufficient for their purchases, while the second problem determines if a student has passed an entrance exam based on their score. Each problem includes a flowchart and pseudocode to illustrate the logic required for implementation.

Uploaded by

lta.fmmlopez
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/ 2

Lyceum of the Philippines University

College of Engineering, Computer Studies and Architecture


Department of Computer Studies

DCSN03C- COMPUTER PROGRAMMING 2


AY 2024-2025

Name: Lance Ezekiel M. Lopez Section: IT-103

1. If Conditional Statement in Python

Problem: Create a program that requests the user’s input for their payment and the price of the
total items they bought. The program must display “Insufficient funds” if the price exceeds the
amount of payment.

Problem Analysis:

A. Start
B. Request user to input his/her payment
C. Request user to input the total price of the items
D. If the total price of items is greater than the payment. Display ”Insufficient funds”.
E. End

Flowchart:

Pseudocode:

payment= float(input("amount of payment: "))


total_price= float(input("the total price of the items: "))

if total_price > payment:


print("Insufficient funds")
Lyceum of the Philippines University
College of Engineering, Computer Studies and Architecture
Department of Computer Studies

DCSN03C- COMPUTER PROGRAMMING 2


AY 2024-2025

2. If else Conditional Statement in Python

Problem: Create a program that determine if the student has passed the entrance exam. Request
for the user to input the score on the exam. The passing score is 70% and the total items are 100. If
the score higher than 70, the program should display “Congratulations on passing the exam, you
may enroll in our university.”. Else, display “You are required for an interview.”.

Problem Analysis:

A. Start
B. Request user to input the score on the exam.
C. If the score higher than 70, the program should display “Congratulations on passing the exam,
you may enroll in our university.”
D. Else, display “You are required for an interview.”.
E. End

Flowchart:

Pseudocode:

Score= int(input("Please enter your score over 100: "))

if 100 < Score :


print("Error, please try again")
if Score >= 70:
print("Congratulations on passing the exam, you may enroll in our
university. ")
else:
print("You are required for an interview.")

You might also like