Python Forum
Python 3.13 : def setup size
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python 3.13 : def setup size
#1
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

Attached Files

Thumbnail(s)
       
Reply
#2
Please, don't post images of code, errors, input/output.
Copy/paste as text, properly formatted using BBCode tags

https://idownvotedbecau.se/imageofcode
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
What is “size(600, 600)” supposed to do? Python sees it as calling a function named size and passing two arguments
Reply
#4
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
Reply
#5
(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?
Reply
#6
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...rocessing/
Reply
#7
(Dec-02-2024, 09:59 AM)HansieB Wrote: How do I do that?
https://python-forum.io/misc.php?action=help&hid=25
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Setup Notepad++ for python LavaCreeperKing 8 14,959 Mar-06-2025, 12:30 PM
Last Post: DeaD_EyE
  Python code for alignment and font size 1418 0 933 Jan-14-2024, 03:56 AM
Last Post: 1418
  How to do "fixed size" (wrapping) math in Python? AlexanderWulf 13 5,362 Jul-19-2023, 04:13 PM
Last Post: deanhystad
  Setup Portable Python on Windows for script starts with double clicks? pstein 0 2,646 Feb-18-2022, 01:29 PM
Last Post: pstein
Question Opening small size browser with python selenium not work, need help greenpine 0 2,187 Feb-07-2022, 11:36 AM
Last Post: greenpine
  How to set Tab size to 4 in Python interpreter? zzzhhh 1 2,588 Jan-18-2022, 12:11 PM
Last Post: snippsat
  VSCode Setup and configuring to run with Python apollo 2 3,905 Jan-13-2021, 04:55 PM
Last Post: jefsummers
  Python Idlex setup robsuttonjr 3 4,430 Jan-09-2021, 09:54 PM
Last Post: Gribouillis
  python setup.py install error blackclover 2 9,942 Jan-07-2021, 04:36 AM
Last Post: blackclover
  'python setup.py bdist' gets error on 'compiler_flags' 1780yz 0 2,771 Sep-02-2020, 09:17 PM
Last Post: 1780yz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020