Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description: I need some help to write a program in Scratch that will use a list. The list will store a group of random numbers.

Description: I need some help to write a program in Scratch that will use a list. The list will store a group of random numbers. Then, sum up that list of random numbers and compute the average of the numbers in the list. The sprite will display both values differentiate by a message or user select area/button to display differentiated values.

Step One::Create a list named numbers. Numbers will be used by all sprites and will be used to store a list of random numbers. The user will input the desired number of items in the list.

Step Two::Add in a script to run when the green flag is clicked. Then, random numbers (user input) ranging from 1 to the users number are added to the list. Add in code so that when the space bar is pressed all numbers are removed from the list. Add in code so that when the down arrow is pressed all of the numbers are added to a variable named sum. Then, the average is computed.

The output should be similar to what's shown below.

image text in transcribed

count numbers numbers count sum count 11 sum 227 numbers 1 48 sum 0 1 48 2 7 2 7 3 13 3 13 4 41 4 41 5 1 5 1 (empty) 6 29 6 29 7 35 7 35 8 31 8 31 9 14 9 14 10 8 10 8 length: 0 length: 10 length: 10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

ISBN: 1844804526, 978-1844804528

More Books

Students also viewed these Databases questions

Question

Define control and extraneous variables.

Answered: 1 week ago

Question

Proficiency with Microsoft Word, Excel, PowerPoint

Answered: 1 week ago

Question

Experience with SharePoint and/or Microsoft Project desirable

Answered: 1 week ago