Week3



    
This week we learned about Boolean, if, if else, else... I think I do feel very challenging about coding now. The understanding of boolean really needs logical thinking. I watched the video repeatedly about boolean but I still feel confused by some concept of it. In my understanding I think the use of the Boolean is to create a switch. How can my var be understand as a Boolean number? In some example I saw some cod  like let x=-1 and then have if x==1 dose some thing like this be understand as boolean? Is only 0 means false and other number means true? Also I am kind confused by  is it same if I let x=1 then said x==!x with if I just said x=true? Also I feel confused by ==. I know it means is something equal to something, but is it only shows up after if? And is it always used with Boolean? In my understanding I think Boolean means define a variable is true or false. Also kind don't understand the difference between var and let.


In this week's worksheet I also find a lot of challenge, for the second question. I kind know the point is add a switch for it. So I am thinking to define the range first. But I can't get clear with the logic of Boolean. I let x=true then I add it to x=!x, I can some how have the mouse first time leave the last rect and keep it light up but the code dose not go through


 







Also in other questions in worksheet I do have some problem, for the 4 I am thinking to use frame rate to control the time, but I have this line with confused me .



In the slider bar one I think I did matched everything, but my bar can't reach the end of the rect, but the parameter I have in the if() is same with the rect.



In my group work with Shanshan, I think we have the same goal quickly. We want to make something visually beautiful and colorful; I Also can relate to most of the interactive cod we have learned so far. So we want to make a moving cable car which can change the size by mouse X, also when it disappeared you can bring it back by clicking the mouse. A huge part of the project is to calculate the cable car. In the animation part, we plan to use boolean because we think it is a switch for the car, but in the end, we don't need it. 









 

Comments

Popular posts from this blog

week4

Week 1 Blog