Python Forum
Python 3.13 : def setup size - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python 3.13 : def setup size (/thread-43616.html)



Python 3.13 : def setup size - HansieB - Nov-30-2024

Dear Forum member,

How do I define "define setup : size"?

"
def setup ():
...
size(600,600)

" : Attachment : Size

Result : Attachment : NameError : Size not defined.

Regards.

HansieB



Regards.

Hans


RE: Python 3.13 : def setup size - buran - Nov-30-2024

Please, don't post images of code, errors, input/output.
Copy/paste as text, properly formatted using BBCode tags

https://idownvotedbecau.se/imageofcode


RE: Python 3.13 : def setup size - deanhystad - Nov-30-2024

What is “size(600, 600)” supposed to do? Python sees it as calling a function named size and passing two arguments


RE: Python 3.13 : def setup size - HansieB - Dec-02-2024

Dear member,
I have copied the lines from the book "Math advantures with python(3), Farell (2019).

Setup is a Processings build in function. With the setup() function the size of a display screen is declared. Using size(600,600) a display screen of 600 pixels by 600 pixels is defined.

Regards.

HansieB


RE: Python 3.13 : def setup size - HansieB - Dec-02-2024

(Nov-30-2024, 10:52 AM)buran Wrote: Please, don't post images of code, errors, input/output.
Copy/paste as text, properly formatted using BBCode tags

How do I do that?


RE: Python 3.13 : def setup size - deanhystad - Dec-02-2024

Looking at a book preview online it appears that it uses turtle graphics and a package called processing. size(600, 600) appears to be a processing command. You can learn about processing here:

https://processing.org/

An article about using processing

https://www.geeksforgeeks.org/how-to-set-up-python-mode-for-processing/


RE: Python 3.13 : def setup size - buran - Dec-02-2024

(Dec-02-2024, 09:59 AM)HansieB Wrote: How do I do that?
https://python-forum.io/misc.php?action=help&hid=25