当我尝试运行python编程时始终显示错误

问题描述 投票:0回答:1

我只是在学习python。所以我下载了pycharm。但是,当我尝试对其进行编译时显示错误。我的代码:-

n=int
n= input("Enter your no.")
k= int
k= input("Enter your another no.")
print(k+n)

错误C:\ untitled1 \ venv \ Scripts \ python.exe:在C:/ Phython中找不到__main__模块

我已经尝试了几种更改脚本路径或更改模块的方法。添加文件名但无济于事

python pycharm
1个回答
0
投票

您好,欢迎Ghst,我没有PyCharm,但是当我在Visual Studio Code中运行您的代码时,它运行良好。我也找到了this question。据您了解,它基本上是相同的。尝试使用该问题下方的提示,看看其中是否有解决问题的方法。

© www.soinside.com 2019 - 2024. All rights reserved.