0% found this document useful (0 votes)
40 views

Programm - Ing Concepts: Paper 2 Section 2: Chapter 11 Pgs Unit

The document provides examples of pseudocode for programs using the Repeat...Until loop structure. It includes pseudocode and output for programs that print numbers from 1 to 10, print a name 10 times, print odd numbers up to 20, print even numbers up to 20, print numbers in descending order, calculate the sum of the first 12 numbers, ask for Y/N input and only accept Y, and print a multiplication table. It also provides activities to write pseudocode for converting between units like miles to kilometers, temperatures in Celsius to Fahrenheit, and finding the smaller of two numbers. Finally, it explains the differences between IF/ELSE/ENDIF and CASE/OF/ENDCASE structures as well as constants and variables

Uploaded by

ky humor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Programm - Ing Concepts: Paper 2 Section 2: Chapter 11 Pgs Unit

The document provides examples of pseudocode for programs using the Repeat...Until loop structure. It includes pseudocode and output for programs that print numbers from 1 to 10, print a name 10 times, print odd numbers up to 20, print even numbers up to 20, print numbers in descending order, calculate the sum of the first 12 numbers, ask for Y/N input and only accept Y, and print a multiplication table. It also provides activities to write pseudocode for converting between units like miles to kilometers, temperatures in Celsius to Fahrenheit, and finding the smaller of two numbers. Finally, it explains the differences between IF/ELSE/ENDIF and CASE/OF/ENDCASE structures as well as constants and variables

Uploaded by

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

PROGRAMM

-ING
CONCEPTS
PAPER 2
SECTION 2: CHAPTER 11 PGS
UNIT

1
LOOP STRUCTURES
3RD LOOP: REPEAT…UNTIL

2
REPEAT….UNTIL LOOP
( PSEUDOCODE)

3
REPEAT….UNTIL
PROGRAM # 38
( TO PRINT NUMBERS FROM 1 TO 10 )

4
PROGRAM # 38 ( PSEUDOCODE )

5
PROGRAM # 38 (OUTPUT)

6
PROGRAM # 39 REPEAT….UNTIL
( TO PRINT YOUR NAME 10 TIMES )

7
PROGRAM # 39 ( PSEUDOCODE )

8
PROGRAM # 39 (OUTPUT)

9
PROGRAM # 40
( TO PRINT ODD NUMBERS TILL 20)

10
PROGRAM # 40 ( PSEUDOCODE )

11
PROGRAM # 40 (OUTPUT)

12
PROGRAM # 41
( TO PRINT EVEN NUMBERS TILL 20)

13
PROGRAM # 41 ( PSEUDOCODE )

14
PROGRAM # 41 (OUTPUT)

15
PROGRAM # 42
( TO PRINT NUMBERS IN DESCENDING ORDER )

16
PROGRAM # 42 ( PSEUDOCODE )

17
PROGRAM # 42 (OUTPUT)

18
PROGRAM # 43
( TO PRINT SUM OF FIRST 12 NUMBERS )

19
PROGRAM # 43 ( PSEUDOCODE )

20
PROGRAM # 43 (OUTPUT)

21
PROGRAM # 44
( TO KEEP ASKING FOR Y OR N AND ONLY ACCEPTS Y)

22
PROGRAM # 44 ( PSEUDOCODE )

23
PROGRAM # 44 (OUTPUT)

24
PROGRAM # 45
( TO PRINT MULTIPLICATION TABLE )

25
PROGRAM # 45 ( PSEUDOCODE )

26
PROGRAM # 45 (OUTPUT)

27
ACTIVITY :
FOR MAKING PSEUDOCODES OF PROGRAMS
1. Write a pseudocode of a program where you convert given miles
into kilometers with respect to given rate:
1 mile = 1.6 Km
2. Write a pseudocode of a program where you convert given rupees into
dollars with respect to given rate:
140 rupees = 1 dollar
3. Write a pseudocode of a program where you convert given temperature
in Centigrade into Fahrenheit according to given formula:
F = ( 9 / 5 ) * C + 32
4. Write a pseudocode of a program where you find the smaller number
from two given input numbers
5. Write a pseudocode of a program where you :
- take 5 input numbers
- calculate their sum and average
- display their results

28
DIFFERENCES BETWEEN :
IF….ELSE…ENDIF AND CASE…OF…ENDCASE
IF…ELSE…END

1. It is used when we have to check for 2 choices

2. It is also used when complex/complicated conditions are to be


implemented

CASE….OF…ENDCASE

1. It is used for large number of choices

2. It is also used when simple conditions are to be implemented e.g. for selecting
days in a week we press numbers from 1 to 7.

29
DIFFERENCES BETWEEN :
CONSTANT AND VARIABLE
CONSTANT :

1. A value that can not be changed during execution of program once it is


defined.

2. E.g. PI = 3.14

VARIABLE :

1. A value that can be changed during execution of program once it is defined.

2. E.g. counter = 1

30

You might also like