- 3

How do we know if the print in python has to be capital P or small p

Help pls am new to python

11th Feb 2022, 8:21 AM
Jayyden2468
32 ответов
+ 12
Jayyden2468 There are some naming convention which should be followed like 1 - Class name starts with Capital letter 2 - function name starts with small letter 3 - variable name should be snake_case or camelCase like (firstName, lastName) 4 - variable and function name should not be start from numeric like (123abc) this is wrong. 5 - variable name should not be same as inbuilt function like (max, min, sum) There are many other conventions you should know
11th Feb 2022, 8:35 AM
A͢J
A͢J - avatar
+ 7
try it yourself it will give you error if you write: Print("hello world") error: name 'Print' is not defined so just chnage the case of print: print("hello world") hello world
11th Feb 2022, 8:34 AM
NEZ
NEZ - avatar
+ 5
It will always be small p. Its a function name that too a pre-built one. The developers will and should follow a specific convention. All the function names should start with small letter. If you use Print(), the python interpreter will throw error and suggest you 'did you mean print()'.
11th Feb 2022, 8:31 AM
dumbhousekot
dumbhousekot - avatar
+ 5
ravilnicki Yes you are right but camelCase is also preferable and we can use. But for more readability we should use snake_case
11th Feb 2022, 11:07 AM
A͢J
A͢J - avatar
+ 3
Thanks guys I understand now
11th Feb 2022, 8:38 AM
Jayyden2468
+ 3
Python Is case sensitive, that Means that a built-in function such as print Is different from Print, and the second One Will give you an error
12th Feb 2022, 7:42 AM
Federico Bassi
Federico Bassi - avatar
+ 3
Function command in python starts with small letter but class starts with capital letter. Its the convention so that other python programmers can understand your code
12th Feb 2022, 6:39 PM
okonkwo calistus
okonkwo calistus - avatar
+ 2
You should use small p
12th Feb 2022, 4:32 AM
Akshit Kulkarni
Akshit Kulkarni - avatar
+ 1
Starting the Python for Beginners course would be a good start :)
11th Feb 2022, 1:27 PM
Andrew Johnson
Andrew Johnson - avatar
+ 1
I am lol but when I was doing the course I typed big and the code got bugged or smth
11th Feb 2022, 1:27 PM
Jayyden2468
+ 1
If your are trying to print something it should be lowercase. I believe you are making it into something else like a class if you make it capital. I know python is case sensitive and print() is a predefined command.
11th Feb 2022, 11:09 PM
Chelsie Herr
Chelsie Herr - avatar
12th Feb 2022, 7:29 PM
javed
0
Hi everyone I'm mustapha from Morocco and all of the best
12th Feb 2022, 8:48 PM
mustapha topo
0
In python 2, print is one of the keywords.But in python 3 it is replaced as built-in function.So p should be in lower case.
13th Feb 2022, 3:02 AM
Thilak A
0
Small because is the First letter of a built-in method
13th Feb 2022, 4:25 AM
Horacio Ruggeri
Horacio Ruggeri - avatar
0
every programming language has a naming convention check the documentation
13th Feb 2022, 5:08 AM
Naveen Kumar
Naveen Kumar - avatar
0
Hm I didn't know python was so sensitive about the cases
13th Feb 2022, 1:14 PM
Jayyden2468
0
For python related articles you have to visit worldbox mod apk https://apksbrand.com/worldbox-mod-apk-6/
17th May 2023, 2:44 PM
Diana Annu
Diana Annu - avatar
0
In Python, the distinction between using a capital 'P' or a small 'p' in the keyword "print" is essential and depends on the version of Python you are using. The reason for this difference lies in the changes made to the print statement in Python 2 and Python 3. Python 2: In Python 2, the print statement is written without parentheses and with a lowercase 'p', like this: arduino Copy code print "Hello, World!" Python 3: In Python 3, the print statement has been replaced with a print function, and it requires parentheses and a capital 'P', like this: bash print("Hello, World!") If you are using Python 3, it is crucial to use the print function with parentheses, or you will encounter a syntax error. On the other hand, if you are using Python 2, you should use the print statement without parentheses; otherwise, you will encounter a syntax error as well. To summarize, the use of capital 'P' or small 'p' in "print" depends on the version of Python you are using: Python 2: Use print (small 'p') without parentheses. Python 3: Use print() (capital 'P' with parentheses). You just visit https://apkpitch.com/dislyte-mod-apk/.
5th Aug 2023, 2:27 PM
Ven Hankins
0
It will consistently begin with a lowercase 'p.' This is a predefined function name, and it adheres to a specific naming convention developers should follow. Function names are expected to start with a lowercase letter. Attempting to use 'Print()' will prompt the Python interpreter to raise an error and suggest 'print()' instead. For more details [url=https://ffadvanceserver.com/]ff advance server .com[/url]
6th Oct 2023, 2:09 PM
Arham