Scratch tasks NEW?
Hello everyone
I'm not sure if I understood and solved this problem correctly. How would you solve it? Everything can be solved on scratch 😉
That's how I did it…
Regards and thanks in advance!! 🙂
Hello everyone
I'm not sure if I understood and solved this problem correctly. How would you solve it? Everything can be solved on scratch 😉
That's how I did it…
Regards and thanks in advance!! 🙂
I would like to train as an IT specialist for systems integration. I originally worked as an IT systems technologist for 1 year. I would like to prepare for the training. What is the best thing I can learn and practice? I'm well-versed in many areas and have at least mastered the basics, but I'd…
I have a website called beispiel.de but Google has not only indexed beispiel.de but also /impressum /datenschutz and /AuthorMax. Some unsightly subpages that unfortunately slide up very far and are even displayed below the main page. Which of the two should I choose and how should I enter it? Does it have to say https://…
Hey people, Since I am currently “programming” the data pack but can’t make any progress, I wanted to ask you what this Minecraft Java Command does: execute store result storage tutorial:cube x int 1 run scoreboard players get ?xx What I don’t understand at all: What does this “int 1” do in the command? And…
I have applied to the railway for a career changer position as a train driver and in two days I have the entrance test. What do I have to do?! How can I prepare? Is it actually difficult? I would be happy for your feedback.
Hello everyone My boss asked me to find out if it would be possible to make an online presentation (created with PPT) available if someone is interested in it and first enters their contact details. Ideally, you'd then be able to track whether someone watched the entire presentation or where they stopped. This would allow…
For example, software engineering, which has nothing to do with being an engineer. Engineering contains the word "engine," meaning motor. Cars, motorcycles, etc., have something to do with "engineering," but not computer programs, which even 12-year-olds tinker with these days. Why is this mistakenly referred to as engineering?
You seem to have understood the task correctly, but you haven't solved it quite correctly yet.
The list glass consists of 4 elements, e.g.
At the beginning, the variable currentElement is set to 0:
You have to note that there is no element 0 in the list glass , because the numbering of the elements starts with 1!
So if you now do the following:
Then, elements 0, 1, 2, and 3 (that's 4 repetitions) are output in sequence. As mentioned, element 0 doesn't exist, but it is counted in the repetitions. However, element 4 is not output, as that would be the 5th repetition of the loop.
In other words, in the loop you must first increment the variable currentElement by 1 and then print the element corresponding to that number.
Furthermore, you should specify the number of loop iterations not with the fixed number 4, but with the variable length of glass . This has the advantage that this point doesn't have to be changed every time the number of elements in the list glass changes. It also makes the program easier to understand; because why "4" has to be used is less immediately obvious to a reader (or to yourself after a while) than if it were "length of glass" instead. [This applies generally to software development: Avoid constant values (numbers, characters, etc.) in the program wherever possible, but instead use commented variables with descriptive names.]
Finally, it is good practice to generally close blocks, for example, here with "stop everything".
The finished Scratch program should look like this:
Thanks, I did that too.