0% found this document useful (0 votes)
56 views3 pages

PROGRAMMING

The document contains programming questions and pseudo code. Question One involves drawing a shape by moving, turning, and drawing. Question Ten involves calculating averages of exam scores and determining a 'PASS' or 'FAIL' output. Question Nineteen involves filling colors in a grid pattern by moving and filling. Question Sixteen involves variables A and B with assigned values.

Uploaded by

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

PROGRAMMING

The document contains programming questions and pseudo code. Question One involves drawing a shape by moving, turning, and drawing. Question Ten involves calculating averages of exam scores and determining a 'PASS' or 'FAIL' output. Question Nineteen involves filling colors in a grid pattern by moving and filling. Question Sixteen involves variables A and B with assigned values.

Uploaded by

Remmy Simiyu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PROGRAMMING

QUESTION ONE

When run

Repeat 4 times

Do move forward by 100 pixels

Draw (edit)

Turn right by 90 degrees

Move forward by 20 pixels

Draw (edit)

Turn left by 90 degrees

Move backward by 20 pixels

Draw (edit)

Repeat 4 times

QUESTION TEN

INPUT: mid-term exam, end-term exam

MODEL: mid-term exam

Find average if average is below 50% add 5


otherwise add 3

End-term exam

If total is above 70% ‘PASS

Otherwise ‘FAIL’

OUTPUT: ‘PASS’ ‘FAIL’


PSEUDO CODE:

Input: mid-term exam, end-term exam.

Calculate average (mid-term exam + end-term exam) divided by 2

If average is below 50% add 5% otherwise add 3% to find total

Compare total if 70% and above output ‘PASS’

Otherwise output ‘FAIL’

QUESTION NINETEEN

Move one square Right

Move one square Right

Move one square Right

Move one square Right

Move one square down

Fill in with colour

Move one square Right

Move one square down

Fill in with colour

Move one square Right

Move one square down

Fill in with colour

Move one square Right

Move one square down

Fill in with colour

Move one square left

Move one square left


Move one square left

Move one square left

Move one square left

Move one square left

Fill in with colour

Move one square up

Move one square Right

Fill in with colour

Move one square up

Move one square Right

Fill in with colour

Move one square up

Move one square Right

Fill in with colour

QUESTION SIXTEEN

A - 3

B - 2

You might also like