Rendering Lists: различия между версиями
Материал из Поле цифровой дидактики
Made the image smaller and added the See Also section. |
Patarakin (обсуждение | вклад) Нет описания правки |
||
| (не показаны 2 промежуточные версии этого же участника) | |||
| Строка 1: | Строка 1: | ||
This tutorial will explain how elements of a [[list]] of numbers can be plotted as a graph. | This tutorial will explain how elements of a [[list]] of numbers can be plotted as a graph. | ||
| Строка 20: | Строка 18: | ||
== See Also == | == See Also == | ||
* [[List]] | * [[List]] | ||
* https://en.scratch-wiki.info/wiki/Rendering_Lists | |||
[[Category:Scripting Tutorials]] | |||
Текущая версия от 22:32, 26 августа 2022
This tutorial will explain how elements of a list of numbers can be plotted as a graph.
Script
Here is the script:
define Render // Enable run without screen refresh
set [i v] to (1)
erase all
pen up
go to x: (-240) y: (0) // Start at the far left of the stage
pen down
repeat (length of [list v])
go to x: ((((480) / (length of [list v])) * (i)) - (240)) y: ((item (i) of [list v]) * (scale))
change [i v] by (1)
end
