shape = codesters.Circle(0, 0, 100, "blue") isblue = true iscircle = "True" if isblue:…
- User
shape = codesters.Circle(0, 0, 100, "blue")
is_blue = true is_circle = "True"
if is_blue: shape.move_up(175)
if is_circle == True: shape.move_right(175)
This program has a bug, or error. So let's debug it!
RULE: Booleans need to start with a capital T or F, with no quotes surrounding them.
Click Run and read the error message that pops up. Then click OK. Fix the booleans to make the circle move to the top righthand corner! Click Run to see if you fixed the program. When it is fixed, click Submit and Next.
- Assistant
is_circle = True
- User
fix it
- Assistant
Great! Now the program is fixed and the circle will move to the top right corner. You can go ahead and click Run to see the circle move to its new position. If everything looks good, you can click Submit and then Next.
- User
give me the whole code
- Assistant
shape = codesters.Circle(0, 0, 100, "blue")
is_blue = True is_circle = True
if is_blue: shape.move_up(175)
if is_circle == True: shape.move_right(175)