When the input consists of numbers and strings should I put quotation marks 🤔 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

When the input consists of numbers and strings should I put quotation marks 🤔

27th Oct 2021, 6:09 PM
Abdalrhman Alfayuomey
26 Answers
+ 5
Yes since it's a string it has to be in quotation marks.
27th Oct 2021, 6:44 PM
Simon Sauter
Simon Sauter - avatar
+ 4
Which programming language? Please give an example input and explain what you want to do with the input.
27th Oct 2021, 6:11 PM
Lisa
Lisa - avatar
+ 2
input is like this: my_input = input() output is like this: print("Output 4 you")
27th Oct 2021, 6:27 PM
Lisa
Lisa - avatar
+ 2
The print statement is for output, not for input.
27th Oct 2021, 6:30 PM
Simon Sauter
Simon Sauter - avatar
+ 2
If you write Print("I can count from 1 to 100") as your "input" to write a code, it is wrong. Because you have to write 'print' instead of 'Print'. If your code should use Print("I can count from 1 to 100") to take an input from an user, it is wrong. Because 'print' is an output, not an input.
27th Oct 2021, 6:39 PM
Coding Cat
Coding Cat - avatar
+ 2
Yes, if you want to print some text on the console, this is right.
27th Oct 2021, 6:44 PM
Coding Cat
Coding Cat - avatar
+ 2
Bro uh should try this one <3 my_input = input() output is like this: print("Output for you")
29th Oct 2021, 1:51 PM
YashVibes
YashVibes - avatar
+ 1
print needs to be lower case but apart from that – your code should work
27th Oct 2021, 6:20 PM
Lisa
Lisa - avatar
+ 1
In Python all input is of type string. If you want a different type you have to convert it. (I'm not entirely sure if this is what you want to know.)
27th Oct 2021, 6:28 PM
Simon Sauter
Simon Sauter - avatar
+ 1
Because there is no input() statement.
27th Oct 2021, 6:34 PM
Simon Sauter
Simon Sauter - avatar
0
Currently I learning python For example : Print ("I can count from 1 to 100000") is that correct ? I'm sorry about my lame English 😅
27th Oct 2021, 6:17 PM
Abdalrhman Alfayuomey
0
That's not the answer what I want I need to know if my input correct or not , thanks
27th Oct 2021, 6:22 PM
Abdalrhman Alfayuomey
0
It is correct – but there is no input in your code?
27th Oct 2021, 6:24 PM
Lisa
Lisa - avatar
0
Do you want to say that my question is not clear?
27th Oct 2021, 6:26 PM
Abdalrhman Alfayuomey
0
Yes.
27th Oct 2021, 6:26 PM
Simon Sauter
Simon Sauter - avatar
0
Okay. I ask about if this input is correct or not Print("I can count from 1 to 100 ")
27th Oct 2021, 6:29 PM
Abdalrhman Alfayuomey
0
No.why there is no input in my code
27th Oct 2021, 6:33 PM
Abdalrhman Alfayuomey
0
I'm sorry but can you give me example about correct statement
27th Oct 2021, 6:36 PM
Abdalrhman Alfayuomey
0
Take the Python for Beginners course. It is all explained there.
27th Oct 2021, 6:36 PM
Simon Sauter
Simon Sauter - avatar