python做hello world时提示程序异常 exit code 非0,该怎么解决

python做hello world时提示程序异常 exit code 非0,该怎么解决,第1张

通常是因为语法错误,你可以检查是不是形如:

print ‘Hello, World!'

print ('Hello, World!')

其中尤其需要注意,print 必须全部是小写,否则系统认不出,就会报错。

public class Hello{

    public static void main(String[] args){

        System.out.println("Hello world")

    }

}

注意你的标点符号有的是在中文输入法下输入的,所以编译不了,还有return和0;中间要分开,你可以复制下面的代码,对照一下:

#include<iostream> //预处理命令

using namespace std //命名空间

int main()

{

char str[9] //变量

cout << "HELLOW WORLD" //输出

cin >> str //输入

cout << "HELLOW WORLD" //输出

cout << str << endl //输出

return 0 //函数返回

}


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/12147799.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-21
下一篇 2023-05-21

发表评论

登录后才能评论

评论列表(0条)

保存