0% found this document useful (0 votes)
5 views14 pages

By Sofyan Kirat

s xc xcdsccdvgbfbhnhnh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views14 pages

By Sofyan Kirat

s xc xcdsccdvgbfbhnhnh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

By Sofyan kirat

Task 1
• 1.start
• 2.input a , b
• 3.if a > b then max = a
• 4.else max = b
• 5. print max
• 6. end
Task 1 (The program by python)
Task 2
• 1.start
• 2.set I to 1
• 3.while I <= 100
• 4.if I % 2 == 0 then print I
• 5.set I to I + 1 (increment)
• 6.end loop when I exceed 100 (I >
100)
• 7.end
Task 2 (The
program by
python)
Task 3
• 1.start
• 2.set sum to 0
• 3.set I to 1
• 4.while I <= 10
• 5.input number
• 6.set sum to sum + number
• 7.Set I to I + 1 (increment)
• 8.end loop when I exceed 10 (I > 10)
• 9.set mean to sum/10
• 10. Print mean
• 11.end
Task 3 (The program
by python)
Task 4
• 1.start
• 2.input number
• 3.set factorial to 1
• 4.while number != 1 and number >= 0
• 5.if number > 0 then set factorial to factorial * number and set
number to number – 1
• 6.else set factorial to 1 and set number to number + 1
• 7.end loop when number = 1 or number < 0
• 8.if number = 1 then print factorial
• 9.else print "ERROR: The number is negative"
• 10.end
Task 4 (The program by python)
Task 5
Task 5(The program by python)
Task 6
• 1.start
• 2.input a
• 3.input b
• 4.input c
• 5.set l to a + b + c
• 6.set s to l / 2
• 7.if a > 0 and b > 0 and c > 0 then set area to
sqrt(s * (s - a) * (s - b) * (s - c)) and print area
• 8.else print "ERROR: Unexpected length of the
triangle "
• 9.end
Task 6(The program by python)
THANKS

You might also like