Problem Set 1#

TASK I:#

  1. 注册https://codingbat.com/python

  2. 进入https://codingbat.com/python/String-1,点击第一个问题hello_name。阅读要求并且实现这个函数。实现完毕以后你可以点击run。如果函数通过所有测试,那么屏幕会显示All Correct!如果函数有问题,你可以比较实际结果和Expected Output(正确结果)之间的区别。

这个函数的实现在 函数与字符串,不过建议你先自己尝试完成。

  1. 完成https://codingbat.com/python/String-1的所有问题。将运行结果的截图提交到钉钉作业本里。

TASK II:#

Implement a function called replace_space() in Python that prompts the user for input and then outputs that same input, replacing each space with … (i.e., three periods).

../_images/terminal.gif

提交方式:请注册OnlineGDB,登陆以后点击Create New Project. 点击上方Save,保存为HW2。

编写完程序之后再次保存,点击Share,在作业本中提交作业链接。

作业截止时间:10月8日晚上10点。

>>image:: terminal.gif