
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is an easily understandable brief description of concepts for problem solving and object oriented programming.
Typology: Slides
1 / 32
This page cannot be seen from the preview
Don't miss anything!

























Class Average Input Processing Output Number of students in class, mark scored by each student Determine total of marks secured by students Find average of marks Class average of marks
Input 5 90 85 70 50 60 Output
Processing Involved
Repeated execution of set of statements
Example use Sum of first ‘n’ numbers sum = current = n= while current <= n: sum=sum + current current = current + 1
a=0; b= while a < b: # One way to code counter loops print(a, end=' ') a += 1 # Or, a = a + 1 Output: 0 1 2 3 4 5 6 7 8 9 Include end=‘ ‘ in print statement to suppress default move to new line
Pattern Generation Input Processing Output Staircase height Create steps one by one To create a step print character equal to length of step Pattern
Pseudocode READ staircase_height if staircase_height > 0 x = 1 Repeat y = 1 Repeat print # y = y + 1 Until y <= x x = x + 1 Until x <= staircase_height End if Else Print “Invalid input”