[自学Python纪录] HackerRank 新手30天挑战-Day00

Hi there! 我是嘟嘟~受到前辈启发,想说可以纪录一下自己练习的过程,小女子为程式超超新手,此系列非教学文,仅为个人解题笔记,可能有错误或未补充详尽之处,欢迎前辈们不吝指教!也欢迎正在自学的伙伴一起讨论学习~


Day 0: Hello, World.

输入格式 Input Format

A single line of text denoting inputString (the variable whose contents must be printed).

输入单行字串,作为要印出的变量
  

输出格式 Output Format

Print Hello, World. on the first line, and the contents of inputString on the second line.

第一行印出Hello, World,第二行印出输入的字串
  

输入範例 Sample Input

Welcome to 30 Days of Code!

  

输出範例 Sample Output

Hello, World. Welcome to 30 Days of Code!

  
  

我的解答:

input_string = input() #宣告名为input_string的变数print('Hello, World.')print(input_string)

  
  
 
参考print()的小补充

Python初学重点 (04) – 聊聊print()

关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章