a001: 哈啰
这篇教学会示范 ZeroJudge 基础题库“a001: 哈啰”的解题过程 ( 这题是学习所有程序语言的第一个练习 )。
题目需求
写一个程序,可以读入指定的字串,并且输出指定的字串,比如:输入字串 "world", 则请输出 "hello, world"。
题目链接:a001: 哈啰
解答
使用字串的相加,就能让输入的文字前方,加上 hello 的文字。
output = 'hello, ' + input()
print(output)
这篇教学会示范 ZeroJudge 基础题库“a001: 哈啰”的解题过程 ( 这题是学习所有程序语言的第一个练习 )。
写一个程序,可以读入指定的字串,并且输出指定的字串,比如:输入字串 "world", 则请输出 "hello, world"。
题目链接:a001: 哈啰
使用字串的相加,就能让输入的文字前方,加上 hello 的文字。
output = 'hello, ' + input()
print(output)