Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Case

algorithm and programming exercise

Rating
-
Sold
-
Pages
8
Grade
A
Uploaded on
23-02-2023
Written in
2021/2022

its alpro exercise with answer on it (python). hope it will help you guys

Institution
Course

Content preview

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

Written for

Institution
Course

Document information

Uploaded on
February 23, 2023
Number of pages
8
Written in
2021/2022
Type
CASE
Professor(s)
Ms
Grade
A

Subjects

$8.31
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
celinlevina1303

Also available in package deal

Get to know the seller

Seller avatar
celinlevina1303 universitas surabaya
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
16
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions