赞
踩
问题一:
C:\Users\asus>print("Hello World")
无法初始化设备 PRN
解决办法:先执行python解释器,再执行python代码
C:\Users\asus>python
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello World!")
Hello World!
>>>
问题二:
>>> for i in (0,1,2,3,4,5):
... print(i)
File "<stdin>", line 2
print(i)
^
IndentationError: expected an indented block after 'for' statement on line 1
解决办法:第二行在print前敲入一个TAB建
>>> for i in (0,1,2,3,4,5):
... print(i)
...
0
1
2
3
4
5
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。