Beginner needs help
Hi
I am can not figure out why one command works in python but not in pycharm.
It looks like that
list(range(10,0,-1))
in python i see this
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
in pycharm nothing happens.
Please sign in to leave a comment.
there is another command does the same thing.
full name = "Linus Torvalds"
fullname.split(" ")
answer in python:
['Linus', 'Torvalds']
nothing in pycharm
That's because interactive python console shows the output of each line, but when you run non-interactively, you should use prints
Thanks! How do I do the first example?
list(range(10,0,-1))
Thank you very much.I think I understand now.
Hi
after this command
>>> a = 0
>>> while(a < 12):
... a = (a+1)
... print("a, a**2, a**3")
...
a, a**2, a**3
a, a**2, a**3
a, a**2, a**3
a, a**2, a**3
a, a**2, a**3
a, a**2, a**3
a, a**2, a**3
a, a**2, a**3
a, a**2, a**3
a, a**2, a**3
a, a**2, a**3
a, a**2, a**3
I got this answer instead of real numbers.Not only in pycharm but in python as well.
Can anyone tell me where is the bug?
Thank you
I found it out.It was the quotation mark's fault.Without that it does execute the command properly.