3.1: Introduction to Conditional Statements - p5.js Tutorial

preview_player
Показать описание


Timestamps:
0:00 Introduction
1:45 Boolean Expressions - True or False
3:15 Relational Operators
3:45 If Statements
6:30 Code Example
7:12 Using Indentation to Improve Readability of Code
0:00 Other Relational Operators

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

#basics #boolean #ifstatement #p5js #javascript
Рекомендации по теме
Комментарии
Автор

I love your energy! I wish every instructor I had teaching me code was like this

flyyeah
Автор

Woow you are amazing teacher..one of the things I noticed since the beginning is that you have passion most of the teachers know all this topic but they don't have passion to explain it.

Mariosub
Автор

As a new self taught developer you are the first teacher that makes code relatable and actually uses a real world example. I struggle understanding synthax if there are no real world web examples. Thank you for your passion in teaching definitely subscribed!

bvsanchez
Автор

I love your videos man, and the way you explain things make them quite clear. But i believe that in order to get good and advance in programming you need to DYI, so i suggest you give us a challenge at the end of videos. Thanks for all the lessons, and please continue!

άλβερτοςΣήθ
Автор

Yeah my first little self programmed game!!!
Thx for this nice tutorials!!

var eli = {
h: 200,
w: 100
}
var ang = 0
var circ = {
x: 200,
y: 100,
r: 100
}
var Xstart = circ.x
var Ystart = circ.y
var hstart = eli.h
var wstart = eli.w


function setup() {
createCanvas(600, 400);
}


function draw() {
background(255);
fill(0, 255, 0);
if ((mouseX - circ.x) * (mouseX - circ.x) + (mouseY - circ.y) * (mouseY -circ.y) * eli.w / eli.h * eli.w / eli.h <= eli.w * eli.w/4 ){
fill(255, 0, 0);
circ.x = Xstart + circ.r * sin(ang)
circ.y = Ystart + circ.r - circ.r * cos(ang)
eli.h = eli.h - eli.h/1000
eli.w = eli.w - eli.w/1000
ang = ang + 0.01
}
if ((mouseX - circ.x) * (mouseX - circ.x) + (mouseY - circ.y) * (mouseY -circ.y) * eli.w / eli.h * eli.w / eli.h > eli.w * eli.w/4 ){
circ.x = 200
circ.y = 100
hstart = 100
wstart = 100
ang = 0
}
ellipse(circ.x, circ.y, eli.w, eli.h);
}

stuartyellow
Автор

The 17 people who disliked probably are losing their minds. I mean this guy is awesome! He makes coding fun!

neeti
Автор

Awesome Teacher . He is the world's best teacher. I havent come across better teacher than him.

kimbedi
Автор

It's hard to find videos like yours!
Simple and short, it's really gonna help me in my class

Chemical_X
Автор

I think your the only video I've seen without any hate comments! such good energy from everyone!!

leasilva
Автор

Hello Coding Train, I started JS a LONGGG time ago, and i'm only 9 years old... But I had to go back to the starting of JS, so that's why I am watching this video, thanks for making this video... JS is where we need to be creative, so thanks a lot for making this.

danisnotdaning
Автор

I can't believe how much I learned from watching your videos. I got blasted by my teacher cause I stopped watching his lectures and mentioned that your tutorials made me understand and grasp concepts better.

nitrobytez
Автор

I find your videos very educating plus your goofy sense of humor is a plus. You got a new subscriber sir! Thanks for sharing the knowledge! Greeting from Finland :).

QuemuelBA
Автор

Your words are lightening to me. This is amazing

ciceroaraujo
Автор

you are the best teacher I ever had with really easy understanding explanations the programming become so easy! thank you million times :)

Mariiian
Автор

Here to help, mate. It's George Boole. So when you refer to the variable type or the logic, it's Boolean because it's named after him. Took me years to remember that. Typed or wrote the little b for ever. :) Love this vid. Keep it up! Great stuff.

AnthonyGaff
Автор

Again, good work on the tutorials. I am enjoying learning on some of the basics that I skipped in my learning curve

DavidTJames-yqdr
Автор

I know I'm late to the party, but you're doing an amazing job teaching this material. I'll be watching all of your p5 tutorials. And Sub'd. Because why not.

andrewyoung
Автор

Great videos, you've definitely earned my subscription. I am an electrical engineering major and I learned C++ and Assembly through my major, but I'm working on learning some JS on my break and your videos are great! My only question is: how flexible is knowledge of p5? If I learn p5, is it easy to transition to other java libraries?

davidleake
Автор

love your videos, keep going ur the best teacher

justacuber
Автор

thanks for all the lessons i got from you, may you live long. thank you!!!!

syedbaryalay