User Profile
Collapse
-
Thanks buddy it works i have to use return whenever i want to call a function. I tried it with different set of codes. Works good. -
Hi,as you can see my code i used global keyword to change global variable value "volvo" to "audi"
This set of code gives me output "This is audi" but my real question is whenever i use def myfunc() in pycharm it execute the code it and shows "process finished with exit code 0" instead of "This is audi"Leave a comment:
-
Its very confusing this indentation part i mean to say when i write the above code in notepad ++ with correct indentation space it show me the output but not in pycharm. Pycharm automatically adjust correct indentation space when you write code in it.Leave a comment:
-
Thanks for your reply but my indentation is correct i just showed my code above. And when you use pycharm it will auto adjust your python code into correct sequence but When i write in notepad ++ it shows me correct output.Leave a comment:
-
Pycharm Not showing output
Hi guys, I just started learning python and i write a simple code using function but it is not showing me output in pycharm which i want it show me "Process finished with exit code 0" please help me out. Thanks in advance.
Code:x="volvo" def myfunc(): global x x="audi" print("This is " + x) myfunc()
No activity results to display
Show More
Leave a comment: