Programming in Scratch


by Krish Beachoo on Aug 9, 2021

Image: https://unsplash.com/@afgprogrammer
Edu Level: NCSE


Problem 1: Prompt the user for 3 numbers and find the sum of the 3 numbers.

![](data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%27615%27%20height=%27300%27/%3e)image

![](data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%27345%27%20height=%27363%27/%3e)image

Problem 2: The National Lottery Control Board gives out bonuses based on the amount of sales made each month. Once the sale is greater than $5000, a bonus of $500 is given otherwise a bonus of $20 is given. Read the sales amount and print the bonus.

![](data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%27550%27%20height=%27420%27/%3e)image

![](data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%27554%27%20height=%27322%27/%3e)image

Problem 3: Write a program to enter a passenger’s name and count the number of passengers travelling on a flight. Calculate the total paid for the flight if a fee of $300 per person is paid. Print the total collected and the number of passengers. The program is terminated when a passenger name “nomore” is entered.

![](data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%27362%27%20height=%27411%27/%3e)image

![](data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%27374%27%20height=%27389%27/%3e)image

Problem 4: Write a program to enter the age and count the number of students in a class. Calculate the average age of the group of students if the program is terminated by 999. Print the number of students in the class and the average age of the students.

![](data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%27509%27%20height=%27581%27/%3e)image

Spot an error? Fill out this form to inform us!