Pre Lab 3 balloon
void setup() {
size(250, 500);
}
void draw() {
background(255);
int x = 100;
int y = mouseY;
if (y < 100) {
y = 100;
fill(#3AB419);
} else if (y > 400) {
fill(#CE2219);
y = 400;
} else {
fill(255);
}
draw_balloon(x, y);
}
void draw_balloon(int x, int Y) {
ellipse(X+100, Y, 70, 70);
line(X+100, Y+35, X+100, Y+135);
}
Pre Lab 3 generic
void setup(){
int score = 60;
if (score >= 50) {
println("Passed");
} else {
println("Failed");
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น