0
"2" + "2"
If I use Powershell and let it run unther python then I can write "2" + "2" and get 22. two strings added; perfect. But if I use an editor and write the same and let it run as a pythonprogram in the commandline then I get an error. Does somebody know why? the Pythonprogramm to write a script and write there "2" + "2" then I get 22. Everything good :D but if I write the same in a editor and let after this as a pythoncode run, then I get a error. Why?
4 Réponses
+ 6
I think if you're making a code file, you need to explicitly tell it that you want to print the value. A command line will automatically print.
+ 4
I think I understand now. If I write in an interpreter "2" + "2" then the computer understand it direct and if I write just a program with "2" + "2" and save this script with test.py then the program have not enough information. You think this is it?
+ 3
Show your full code. Then maybe we can find somewhere else that the code messes up.
0
thanks :D