Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

Need help on this code, but I got this so much far; float bX = 50; float bY = 60; float bWidth = 55; float bHeight = 70; color balloonColor = color(255, 0, 0); float bHSpeed = 2; float bVSpeed = 1; void setup() { size(300, 300); bWidth = random(10, 55); bHeight = random(10, 70); balloonColor = color(random(0, 255), random(0, 255), random(0, 255)); // randomly set the balloon color ellipse(bX + 50, bY + 60, bWidth + 55, bHeight + 70); // set bX and bY; make sure that the balloon //will be entirely on screen when it starts bX = random(bWidth / 2.0, width - bWidth / 2.0); bHSpeed = 2; bVSpeed = 2; smooth(); } void draw( ) { background(255); drawHouse(150, 200, 80, 80); drawHouse(20, 100, 120, 150); drawBalloon(bX, bY, bWidth, bHeight, balloonColor);// draw the balloon by calling drawBalloon() // if there is a horizontal bounce, reverse horizontal speed // if there is a vertical bounce, reverse vertical speed } /* Your code for drawBalloon( ) goes here */ void drawBalloon(float x, float y, float w, float h, color c) { fill(c); ellipse(x, y, w, h); } /* Your code for drawHouse( ) goes here */ void drawHouse(float x, float y, float w, float h) { float topY = y + h / 3.0; fill(255); stroke(0); triangle(x + w / 2.0, y, x, topY, x + w, topY); rect(x, topY, w, 2.0 * h / 3.0); rect(x + w / 8.0, y + h / 3.0 + (0.125) * 2 * h / 3.0, w / 8.0, h / 8.0); rect(x + 5.0 / 8.0 * w, y + 3.0 / 4.0 * h, 3.0 / 16.0 * w, h / 4.0); }

MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions

This doesn't look like Python. You might have better luck posting this in the 6.00 group.
When in doubt, decompose it ( break it down ) more. Both of the draw functions need the coordinates to start at, and size and color information to draw a static image. Any movement would be done by other function[s].
which programing language you are using

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Not the answer you are looking for?

Search for more explanations.

Ask your own question