This forum is now read-only. Please use our new forums! Go to forums

0 points
over 9 years

12/15 [resolved] Write an if/else statement that makes the bubbles circle-shaped

I have read all other posts but they all look like the same problem, but I can’t figure out mine. Could someone help me on what is wrong with it? I get the “ Oops, try again. Write an if/else statement that makes the bubbles circle-shaped. Adapt the if/else statement from the the example on the left. “

code:

var red = [0, 100, 63]; var orange = [40, 100, 60]; var green = [75, 100, 40]; var blue = [196, 77, 55]; var purple = [280, 50, 60];

var myName = “Zachary”; letterColors = [orange, blue, green, blue, purple] if (10 < 3) { bubbleShape = “circle”; }

else { bubbleShape = “sqaure”; }

Answer 548bb5c795e378ee2d003b27

3 votes

Permalink

Hi Zachary,

If statements work like this:

if (what is in here is true) {
    do this thing
}  otherwise {
   do this other thing
}

Looking at your code, if you want circles then you will need to put something that is true in the ( ).

Can you think of any equation that is true?

points
Submitted by Judy
over 9 years

2 comments

Oh my. I just realized that I had misspelled the word “square.” I’m so sorry, but I did make it 10>3 along with fixing the misspelled word and it worked. Thank you so much.

Judy over 9 years

You’re welcome!

Answer 548ba0cc76b8fe856f00373e

0 votes

Permalink

I’m stuck on this one too!

points
Submitted by georgie_pie01
over 9 years