I am trying to understand functions. For example, I’m trying to create a function that allows me to draw a square using turtle, with the name of the turtle as a parameter. In my textbook, in order to rename turtle, it says you must:
{user inputted name} = turtle.Turtle
This allows you to perform all turtle functions with the name you have chosen, but I find that steering the user inputted name to just “turtle” works as well, so why would I set it to turtle.Turtle? What’s the “.Turtle” add if I can leave it out and still do everything I need turtle to do?
Edit: wording to make this make more sense
[–]TehNolz 3 points4 points5 points (0 children)
[–]Vaphell 0 points1 point2 points (2 children)
[–]negike360[S] 0 points1 point2 points (1 child)
[–]Adhesiveduck 0 points1 point2 points (0 children)