Are you asking how to write the code to find the maximum value in scratch? The specific steps for scratch to find the maximum value are as follows:
Step 1: Install scratch2.0, delete the Meow character, and add a character you like.
Step 2: Then create variables and lists through the "Data" building block. The variables m, n, and p are used as counter variables, avr is used to store the average, sum is used to store the total, max is used to store the maximum value, and the list score is used to store the value of each number entered.
Start writing the script. Using the principle of divide and conquer, the program is divided into a total program, which is used to call each functional building block and output results; the input building block is used to input scores; the maxscore building block is used to calculate the maximum value; and the avreage building block is used to calculate the average.
After completion, press the green flag to start running and enter the number. Note that this program uses "-1" as the end input mark.
The above are the specific steps for finding the maximum value of scratch.
Scratch is a simple graphical programming tool developed by MIT. The development team of this software is called LifelongKindergartenGroup. The aim is to make children fall in love with this software and build a desire to do programming. The process of building the program involves interesting processes such as graffiti, recording, and finding pictures. The child's finished product can be published directly to the official website through the software. The official website opens a personal space for each registered user to place published programs. Programs released by users can be found on the official website. The program under production can only be run in the software environment, while the released program is run in the web page. Children's works can be seen by countless people through the Internet. The official website has the function of making friends and commenting. There are also websites in China that are similar to the official website and run the program on the web page, making it easier for domestic enthusiasts and children to communicate about the works.