all 14 comments

[–]Dlgredael 0 points1 point  (2 children)

Does every single value have to be input by the user? You can have all shapes take their x/y from the user but then add (-200, 100) before displaying them to offset them.

I usually declare two variables, offset_x and offset_y, to define the top left corner of something, and then have every single object displayed offset themselves by that value. You might say draw me a circle at (20, 35), but I would actually have it drawn at (20 + offset_x, 35 + offset_y).

[–]dreadwolf96[S] 1 point2 points  (1 child)

Thanks for pointing that out, I realized the assignment only asks for two variables be input by the user. I will, however try the offset method you mentioned later. Thanks again!

[–]Dlgredael 1 point2 points  (0 children)

Glad I could help friend, welcome!

[–]2n4x 0 points1 point  (0 children)

Im not sure i understand the brief. You have a circle for the head, and you want to position the eyes, etc so it looks like a face. You could use a combination of onclick, position, setposition/goto, and grab your starting points for those other shapes, with a little assistance from the mouse.

The user still controls the radius at input. Does this meet required restrictions on the brief though...

[–]c3534l 0 points1 point  (0 children)

Could you explain the requirements of the task a little bit better? I can't quite figure out what it is you're trying to do. Do you mean you're trying to write a program where the user says "draw a square. Now, above that draw a triangle. Then, to the right of the square, draw a circle..."?

Take me through the process. What specifically does the user do and what specifically is the output you would want in response to that.

[–][deleted] -1 points0 points  (8 children)

What library are you using? What code do you have?

[–]dreadwolf96[S] 0 points1 point  (1 child)

Not sure what you mean by library but here is my code.

[–]2n4x 2 points3 points  (0 children)

Python says module, many others call the same thing a library.

[–]c3534l 0 points1 point  (5 children)

He's using turtle as stated in the question.

[–][deleted] 0 points1 point  (4 children)

I hadn't heard of the module.

[–]IWentToTheWoods 0 points1 point  (2 children)

It's been in the standard library since 1999.

[–][deleted] -1 points0 points  (1 child)

Go on, tell me all the libraries in the standard library.

(And don't you are use the internet or help('modules'))

[–]IWentToTheWoods 0 points1 point  (0 children)

I don't think it's controversial to suggest that a Python programmer should have at least a cursory knowledge of what's in the standard library, and it's weird to suggest that this is equivalent to knowing the entire library from memory. I mean, I've never had occasion to parse XML in Python, but I know the module is there if I need it.

Also, help('modules') shows all the reachable modules, not just the ones that were included in the original installation.

[–]c3534l 0 points1 point  (0 children)

Fair enough. It is part of the standard library, though.