22nd of March
VPython
After following the tutorial video form Youtube, I tried to replicate the practice assignment:
And this is what I got:
The next step, they asked me to remove the other arrows temporarily by adding # to the beginning of the other arrows' command line. Then shorten the one I picked for half of its length, and make it point in the opposite direction than its original direction.
However, due to its length being shorter than the radius of the sphere it is in, it seemed to have disappeared. It is just hidden within the sphere as the radius of the sphere 'swallowed' the arrow.
Then the tutorial went on to teach how to name variables of our own by equating a name that we choose, to the command line. I was then tasked to replicate a 3D model:
This is the coding I came up with and its resulting 3D model:
What happens when we move one sphere twice as far from the y-axis? This is what happens when I input the coding:
The next part of the tutorial taught about the [print] command, which is written as print(variable,attribute). This is the result:
No comments:
Post a Comment