Can anyone read and help with a lab?

Perform data analysis of numeric values enter by user via keyboard:
-use a list of stores values
-read in five single digit positive numbers from user via keyboard
-create console outputs with text labels and values
-perform the following math functions on the values:

  • letter g to repeat the process of another set of values. anything other than g will do nothing
    -promt instructing users how to start over
    -when started over list should be cleared of values
    -no extra text


Okay. So what code do you have so far?
Do you have a setup() function?
A draw() function? How about a keyPressed() function?

I have:
def setup();

def draw();

but am confused how too create the list of any 5 numbers between (0-9)

It’s clear from seeing that code: you do not understand how the setup() and draw() functions work.

Go and read the reference for them:

Also check out keyPressed():

Try writing some real code now. You will want to define the size of the sketch in setup(). In draw(), you will need a call to background. You might also want to add a few calls to text() to display instructions and your numbers (once you define their list).

Then you can look into defining a list of numbers:

Please put some effort in to understand these basics, and some more effort to write some running code. Post your attempted code for more help.

1 Like

what if I just need my answers to come out in the console and

Even with console-displayed numbers, you still need to use setup() and draw() since you will want to get user-input via the keyPressed() function.

This is listed under, and you give def as an example. If that is the case, then you need the reference – Python dialect, not Java.