随笔分类 - CS50Python实验
摘要:Week 5 Unit Tests Testing my twittr 题目描述: 测试Problem Set2中Setting up my twttr程序; 题解: twttr.py def main(): print("Output: ", shorten(input("Input: ")))
阅读全文
摘要:Week3 Exceptions Fuel Gauge 题目描述: 输入分数字符串,判断并输出相应的百分数;特例不足1%输出E,超出99%输出F 思路: 1,从字符串中取出x,y; 2,按题中要求计算输出; 题解: while True: try: ## 取出x,y x, z, y= input("
阅读全文
摘要:Week0 Functions Indoor Voice 题目描述: 将输入的字符串转化为全部小写的字符串; 思路: lower():转换字符串中所有大写字符为小写。 题解: print(input().lower()) Playback Speed 题目描述: 将输入的字符串中间空格部分替换为“.
阅读全文

浙公网安备 33010602011771号