Syntax


#1

WHY do some one add the () signs
print parrot.upper()
What is the mening whit the ()

Can any one explain I dont see the use of em

I have the comand print
and the variabel
parrot
and what i vant to do whit it befor i print
upper
so whay do i have to add some things tat is nott needed The ()
Regads
AcPower


#2

calling a function or method always requires parentheses, they are part of the syntax.

print is an exception, its a statement, statement don’t require parentheses


#3

Thanks for answer

Yes but WHAY
that is my question
Is ther only becuse or is ther any meanin whit it
I have been programing many difrent lanuage over time
and STILL i dont understand the ()
Yes when i put some thing inside put not if i dont

Shall i only accept that some one put it ther or is ther any puropuse

I have ADHD and Dyselektic so i need to understand Whay it gets to abstrakt the () i forget it all the time becuse they dont do anything It is just a lot of sigens like hyroglypht in the code And C is even worse

Thanks in advance :wink:
AcPower


#4

A programming language is built, in this process the creators of the language have to make choices, a choice was made to use parentheses for function calls.

You will see this parentheses again when creating your own custom functions :slight_smile:

Trying to understand why certain design implementation where made in a programming language is not something you want to understand so early in your programming adventure.


#5

MANY Thanks for answer :wink:

Then The anser is That it is that is CALING somthing and shall deliver it in the ()
Then i Mayby can relate to the ()
IT IS vital that i get to know this things NOw not later
If i dont get it now i vill never understand and Drop out of scool to erly becuse i dont understand what Im doing

SO many Thanks for the Answer AND I do relly need to understand that now in the curse
Becuse if i dont unbderstand I just call the inventor of Pythion an Big “¤”))!=?)("#¤(%T Not sutibel language :wink:

But now i did understand what it menas :wink:
So simpel I did thing i just didt it by print many.upper
But the syntax vant to deliver somthing after upper and that shall come betvin () so ther is a purpuse

Sorryt for bad Speling