Repitition Structures - Drawio
Repitition Structures - Drawio
A
Start
counter = 0
INPUT order_complete
counter += 1
order_complete != yes
End
Start
counter = 0
INPUT allowance
counter += 1
False
if counter == 5
True
END
Start
Module time
DECLARE
counter = 10
time.sleep(1)
while count <= 100:
Delay 1 sec
END
count += 10
Start
INPUT students
DECLARE grades = []
DECLARE firstnames = []
for i in range(students):
DISPLAY Enter your First Name
Loop based on the input of STUDENTS
INPUT firstname
END
firstnames.append(firstname)
grades.append(grade)
START
student_grades = {
'student1': {'Laboratory1': 90, 'Laboratory2': 85, 'Midterm': 88},
'student2': {'Laboratory1': 78, 'Laboratory2': 92, 'Midterm': 80},....
END
END
DISPLAY
while not order_complete:
Do you want to order? (yes/no):
INPUT ask
True
DISPLAY ("Thank you for your order!") if ask.lower() != "yes":
False
A
A
item = "Turon"
if choice == 1
cost = 5.00
INPUT quantity
item = "Maruya"
elif choice == 3
cost = 7.00
total_cost = cost *
quantity
total_purchased.append((item, quantity,
total_cost))
DISPLAY
You have ordered {quantity} {item}(s) for a total
cost of ${total_cost:.2f}."
DISPLAY
item = "Buko Juice"
elif choice == 5 Do you want to place another order?
cost = 17.00
(yes/no):
B
DISPLAY
A
Invalid choice. Please select a valid item from the menu.
B
if True
another_order.lower() A
!= "yes":
DISPLAY
Summary of Purchases
Return