ICT ASSIGNMENT
Flow Charts and Pseudo
Codes with Python
Happy Nezza B. Aranjuez
9 – Becquerel
1. A flowershop sells roses for Php 25 each and tulips for Php 40 each. Prepare a
flowchart, pseudocode, and python codethat determines how much Irene will
spend if she will buy R number of rose and T number of tulips.
FLOWCHART:
START Input T Input R
PSEUDOCODE:
TT = T x PR
RR = R x PT
Total = TT + RR
output irene will spend, Total pesos
PYTHON CODE:
2. Print your average grade if it is greater than 85.
FLOWCHART:
PT x T PR x T
(PT x T) +
(PR x T)
Irene will spend
total pesosEND
START Input grade
If grade > 85
PSEUDOCODE:
grade = input what is your grade
if grade > 85 then
output you passed your grade is, grade
else
output that’s alright
PYTHON CODE:
3. Accept and print positive numbers only.
FLOWCHART:
Input gradeInput grade
Output you passed your
grade is, grade
END
Output that’s alright
TRUE FALSE
START Input number
If number is
positive
A
PSEUDOCODE:
number = input "Input a number:"
while True:
if number > 0:
output the number of your choice is, number
break
else:
output invalid number
number = input “Input a number”
PYTHON CODE:
4. Input 3 numbers a, b, and c,
a. If a is equal to b, print c
b. If a is greater than b, then print their difference
c. If b is less than c, then print their sum, otherwise print their average
FLOWCHART:
Output invalid
number
Output
number
TRUE FALSE
END
A
START Input a
If
a = b
FALSE
Input c Input c
If
a > b
If
b < c
FALSE
PSEUDOCODE:
a = input"Input a number:"
b = input"Input a number:"
c = input "Inputa number:"
while True:
if a == b:
outputc
if b < c:
output b+c
break
else:
output (b+c)/2
break
elif a > b:
outputa-b
PYTHON CODE:
5. Print passed if the user
specified grade is at least 75, if otherwise print failed.
FLOWCHART:
Output cOutput
average
TRUE
END A
A
Average =
(b+c)/2
FALSE
Sum =
b + c
Dif =
a - b
TRUETRUE
Output
sum
Output
dif
A
START Input grade
If grade >= 75
TRUE FALSE
PSEUDOCODE:
grade = input "What is your grade?"
if grade >= 75:
output passed
else:
output failed
PYTHON CODE:
6. Convert the user’s weight from pounds to kilograms if the inputted value is positive.
Otherwise, print invalid data. (1kg = 2.2 lbs)
FLOWCHART:
Output FailedOutput Passed
END
START Input weight
If number is
positive
TRUE FALSE
PSEUDOCODE:
weight = input "How many pounds do you weigh?"
if weight > 0:
convert = weight/2.2
output convert
else:
output invalid data
PYTHON CODE:
7. Compute for the equivalent percentage grade of the given score using the format
score/100*60+40. Print a corresponding remark based on the following guidelines:
 90-100 excellent
 85-89 very good
 80-84 good
 75-79 fair
 74 below – needs improvement
FLOWCHART:
Output invalid
number
Output convert
Convert =
Weight/2.2
END
PSEUDOCODE: PYTHON CODE:
score = input"Whatis your score?"
grade =score/100*60+40
if 100>=grade>= 90:
output excellent
elif 89>=grade>= 85:
outputvery good
elif 84>=grade>= 80:
outputgood
elif 79>=grade>= 75:
outputfair
else:
outputneeds improvement

ICT Flowchart and Pseudo codes

  • 1.
    ICT ASSIGNMENT Flow Chartsand Pseudo Codes with Python Happy Nezza B. Aranjuez 9 – Becquerel 1. A flowershop sells roses for Php 25 each and tulips for Php 40 each. Prepare a flowchart, pseudocode, and python codethat determines how much Irene will spend if she will buy R number of rose and T number of tulips. FLOWCHART: START Input T Input R
  • 2.
    PSEUDOCODE: TT = Tx PR RR = R x PT Total = TT + RR output irene will spend, Total pesos PYTHON CODE: 2. Print your average grade if it is greater than 85. FLOWCHART: PT x T PR x T (PT x T) + (PR x T) Irene will spend total pesosEND START Input grade If grade > 85
  • 3.
    PSEUDOCODE: grade = inputwhat is your grade if grade > 85 then output you passed your grade is, grade else output that’s alright PYTHON CODE: 3. Accept and print positive numbers only. FLOWCHART: Input gradeInput grade Output you passed your grade is, grade END Output that’s alright TRUE FALSE START Input number If number is positive A
  • 4.
    PSEUDOCODE: number = input"Input a number:" while True: if number > 0: output the number of your choice is, number break else: output invalid number number = input “Input a number” PYTHON CODE: 4. Input 3 numbers a, b, and c, a. If a is equal to b, print c b. If a is greater than b, then print their difference c. If b is less than c, then print their sum, otherwise print their average FLOWCHART: Output invalid number Output number TRUE FALSE END A START Input a If a = b FALSE Input c Input c If a > b If b < c FALSE
  • 5.
    PSEUDOCODE: a = input"Inputa number:" b = input"Input a number:" c = input "Inputa number:" while True: if a == b: outputc if b < c: output b+c break else: output (b+c)/2 break elif a > b: outputa-b PYTHON CODE: 5. Print passed if the user specified grade is at least 75, if otherwise print failed. FLOWCHART: Output cOutput average TRUE END A A Average = (b+c)/2 FALSE Sum = b + c Dif = a - b TRUETRUE Output sum Output dif A START Input grade If grade >= 75 TRUE FALSE
  • 6.
    PSEUDOCODE: grade = input"What is your grade?" if grade >= 75: output passed else: output failed PYTHON CODE: 6. Convert the user’s weight from pounds to kilograms if the inputted value is positive. Otherwise, print invalid data. (1kg = 2.2 lbs) FLOWCHART: Output FailedOutput Passed END START Input weight If number is positive TRUE FALSE
  • 7.
    PSEUDOCODE: weight = input"How many pounds do you weigh?" if weight > 0: convert = weight/2.2 output convert else: output invalid data PYTHON CODE: 7. Compute for the equivalent percentage grade of the given score using the format score/100*60+40. Print a corresponding remark based on the following guidelines:  90-100 excellent  85-89 very good  80-84 good  75-79 fair  74 below – needs improvement FLOWCHART: Output invalid number Output convert Convert = Weight/2.2 END
  • 8.
    PSEUDOCODE: PYTHON CODE: score= input"Whatis your score?" grade =score/100*60+40 if 100>=grade>= 90: output excellent elif 89>=grade>= 85: outputvery good elif 84>=grade>= 80: outputgood elif 79>=grade>= 75: outputfair else: outputneeds improvement