Page 396 - Ai_417_V3.0_C9_Flipbook
P. 396
Program 3: To input the percentage of a student and award "Certificate of Excellence" if the student gets more
than 80%.
Flowchart
Algorithm START
Step 1 Start
Step 2 Input Percentage Input Percentage
Step 3 if Percentage is more than 80 then
Display "Congratulations"
Is No
Display "You are awarded - 'Certificate of Excellence'" Percentage > 80?
Step 4 Stop
Source Code: Yes
percent=int(input("Enter your percentage:")) Display "Congratulations"
Display "You are awarded"
if percent>80:
print("Congratulations")
STOP
print("You are awarded– 'Certificate of Excellence'")
Output:
Enter your percentage:89
Congratulations
You are awarded– 'Certificate of Excellence'
Program 4: To input day of the week and in case it is SUNDAY then extra cookie as a reward point to be
given with the order.
Flowchart
Algorithm
Step 1 Start START
Step 2 Input weekday
Step 3 if weekday is same as "SUNDAY" then
Display " Reward point - Chocolate Cookie FREE !" Input Weekday
Step 4 Stop
Is
Source Code: Weekday No
SUNDAY?
weekday=input("Enter day of the week:")
if weekday=="SUNDAY":
Yes
print("Reward Point – Chocolate Cookie FREE !")
Display "Reward Point –
Chocolate Cookie FREE !"
Output:
Enter day of the week : SUNDAY
Reward Point – Chocolate Cookie FREE ! STOP
394 Touchpad Artificial Intelligence (Ver. 3.0)-IX

