1. Create an application that can show if someone is eligible to get a scholarship, given their age,
overall grade and lowest grade!
Requirements for the scholarship:
a. Applicants must be at least 17 years old
b. Applicants must fulfil at least one of the following:
i. Have an overall grade of at least 90
ii. Have the lowest grade of 75
Create the algorithm or flowchart, then code it in Python!
Note: Both Overall Grade and Lowest Grade ranges between ( 0 – 100 )
Algoritma :
Step 1 Start
Step 2 input umur, nilaiKeseluruhan, nilaiTerendah
Step 3
if (umur >= 17 and (nilaiKeseluruhan >= 90 or nilaiTerendah >=75)) :
Display ( Selamat Anda mendapatkan beasiswa )
else :
Display ( Anda tidak mendapatkan beasiswa)
ENDIF
Step 4 End
2. Create an application that can determine the amount of discount and how much should the
customer pay, given the customer’s membership status, total purchase.
, If the Customer is a member, and their total purchase is greater than 1 million (1.000.000), then
they will get 10% discount. If the Customer is a member but their total purchase is equal to or
lower than 1 million, then they will get 5% discount instead. If the Customer is not a member,
they will not get any discount, regardless of how much their total purchase is.
See the table in the next slide!
Membership Total Purchase Discount
Yes > 1.000.000 10%
Yes <= 1.000.000 5%
No > 1.000.000 0%
No <= 1.000.000 0%
Using the table and given the membership status and total purchase:
Determine the amount of Discount
Determine how much should be paid
Create the algorithm or flowchart, then code it in Python!
Algoritma :
Step 1 Start
Step 2 input membership, totalHarga
Step 3
if (membership == "Yes" ) : THEN
if totalHarga > 1000000 : THEN
diskon = totalHarga * 0.1
else :
diskon = totalHarga * 0.05
else :
diskon = 0
ENDIF
Step 4 totalBayar = totalHarga - diskon
overall grade and lowest grade!
Requirements for the scholarship:
a. Applicants must be at least 17 years old
b. Applicants must fulfil at least one of the following:
i. Have an overall grade of at least 90
ii. Have the lowest grade of 75
Create the algorithm or flowchart, then code it in Python!
Note: Both Overall Grade and Lowest Grade ranges between ( 0 – 100 )
Algoritma :
Step 1 Start
Step 2 input umur, nilaiKeseluruhan, nilaiTerendah
Step 3
if (umur >= 17 and (nilaiKeseluruhan >= 90 or nilaiTerendah >=75)) :
Display ( Selamat Anda mendapatkan beasiswa )
else :
Display ( Anda tidak mendapatkan beasiswa)
ENDIF
Step 4 End
2. Create an application that can determine the amount of discount and how much should the
customer pay, given the customer’s membership status, total purchase.
, If the Customer is a member, and their total purchase is greater than 1 million (1.000.000), then
they will get 10% discount. If the Customer is a member but their total purchase is equal to or
lower than 1 million, then they will get 5% discount instead. If the Customer is not a member,
they will not get any discount, regardless of how much their total purchase is.
See the table in the next slide!
Membership Total Purchase Discount
Yes > 1.000.000 10%
Yes <= 1.000.000 5%
No > 1.000.000 0%
No <= 1.000.000 0%
Using the table and given the membership status and total purchase:
Determine the amount of Discount
Determine how much should be paid
Create the algorithm or flowchart, then code it in Python!
Algoritma :
Step 1 Start
Step 2 input membership, totalHarga
Step 3
if (membership == "Yes" ) : THEN
if totalHarga > 1000000 : THEN
diskon = totalHarga * 0.1
else :
diskon = totalHarga * 0.05
else :
diskon = 0
ENDIF
Step 4 totalBayar = totalHarga - diskon