NCSE ICT – Scratch Programming – Creating interactive sprites

In this example, we create a sprite which asks for you to enter a subject mark and tells you the grade.

Grade ranges are shown below:

A76 to 100
B50 to 75
C40 to 49
DFail

We will be using a variable to store the users input.

Also, we will used some “if” blocks and logical operators to produce the grade.

See the blocks in the project below:

https://scratch.mit.edu/projects/629271195

Exercise

If someone enters an erroneous mark, e.g 1000 , the program dosen’t say anything to the user.

Copy or remix the project and Add blocks to say “you’ve entered an incorrect mark” if the user enters a mark higher than 100 or a mark less than 0.

(Hint: an IF block and an OR logical operator may be useful for solving this problem!)

© 2022  Vedesh Kungebeharry. All rights reserved. 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s