+ 1
I am not understanding code for print?
3 odpowiedzi
+ 5
Hey, buddy, not understanding print, ah... Don't worry, it's pretty simple..........
Treat it like a thing whose job is to print anything (here, anything means data and data means numbers, text, etc.....)
The very basic information you can give a computer is to print anything and it's job is exactly to do the same!!!!
Wanna print text on the screen???
print("I am putting a text inside the brackets so that it gets displayed!!!! ,please note that every text is written inside quotation marks.")
Wanna print number???
print(4)
print(59878)
print(3.14159876)
print(99.99999999999999), etc......
+ 4
In addition to Ashish’s answer you also can use variable names and functions in print() statement.
a = 23.45
print(a)
# output is 23.45
b = 'hello'
print(b.upper())
# output is 'HELLO'
print(input('Your name: '))
# output is whatever you enter when input asks you.
+ 2
Its simple.
Print('write here whatever you want to be displayed ')
If you want to know further more do mention