😢 DRY

Do Now (in 🐍 CS9 Python)

Write a function called hello that takes two parameters a name and an adjective and combines them. It should work like this:

hello('SK','awesome')

Hey SK, you are very awesome.

DRY: Don’t Repeat Yourself

dry = "Don't repeat yourself"
for x in dry:
    print(dry)

Lab 2.1 - Geometric Fun Times v3.0β„’

Remember when you drew all those shapes? Didn’t it seem like it should be easier? Well…

Do you notice a pattern for the number of sides of a shape, the number of repeat and the turn πŸ”„ ___ degrees for each shape? Hmm…that’s interesting.

1⃣ define a function called sides() that asks for the number of sides and draws a regular polygon with that number of sides. For example, shape(4) would draw a square, shape(5) a pentagon, and so on.

2⃣ define a function called angle() that asks for a number of degrees to turn. This should work like shape(), but every side should be a different color. To make something pretty, test angle(121).

This is angle(200):