[编程入门]电报加密-题解(Python代码)python ord()函数返回对应字符的ascii码chr()函数返回ascii码对应的字符步骤:1.输入数据2.遍历数据*1判读是否是字母是则改成下一个字母(题意)否则字符不变*2输出字母[========]注释 题解列表 2019年11月22日 0 点赞 0 评论 1719 浏览 评分:9.7
[编程入门]电报加密-题解(Python代码) 摘要:** 代码如下:** x=input() s="" for i in x: if i>="a" and i="A" and i…… 题解列表 2019年12月04日 0 点赞 6 评论 2254 浏览 评分:9.9
[编程入门]电报加密-题解(Python代码) 有注释版```python#continue退出本次循环,控制输出str=input()foriinstr:#遍历输出ifi.isalpha()andi!='z':#判断是否为字母排除zprint(chr(ord(i)+1),end='')continueelifi=='z':#z的情况独立输出pri 题解列表 2020年05月26日 0 点赞 0 评论 1024 浏览 评分:9.0
[编程入门]电报加密-题解(Python代码) 摘要:参考代码:def fun1(str1): str2='' #字符串不可改变,故新建空字符串 for i in str1: if i.isalpha()…… 题解列表 2020年10月26日 0 点赞 0 评论 1184 浏览 评分:5.5
[编程入门]50%错误 摘要:解题思路:50%错误,,不知道哪有问题注意事项:参考代码:lst=list(input().split()) s=" " lst2=[] for i in lst: if "a"<=i…… 题解列表 2020年12月01日 0 点赞 2 评论 652 浏览 评分:0.0
python50%错误 摘要:解题思路:不知道错在哪里注意事项:参考代码:a = input().split()b = []for i in a: if 65 <= ord(i) <= 90 or 97 <= ord(i) …… 题解列表 2021年12月14日 0 点赞 1 评论 362 浏览 评分:0.0
[编程入门]电报加密-题解(python代码) 摘要:解题思路: 利用ASCII值进行大小判断,注意 Z 和 z 进行特殊处理。注意事项:参考代码:s=input()x=''for i in s: if i == 'Z…… 题解列表 2022年01月25日 0 点赞 0 评论 922 浏览 评分:9.9
【露离】告诉你50%错误是为什么 摘要:解题思路:注意事项:注意输入行,猜测系统测试时,有类似'zz aa 2wa'连着的测试数据,所以输入用list处理则为['z','z',' &#…… 题解列表 2022年02月05日 0 点赞 0 评论 595 浏览 评分:0.0
还行,一般般吧 摘要:解题思路:注意事项:参考代码:a=str(input())b=[]for i in a: i=ord(i) if i in range(97,122): b.append(c…… 题解列表 2022年02月21日 0 点赞 0 评论 686 浏览 评分:6.0
[编程入门]电报加密 摘要:解题思路:注意事项:参考代码:a=input()b=[]for i in a: if i>='a' and i<'z'or i>='A' and …… 题解列表 2022年03月04日 0 点赞 0 评论 587 浏览 评分:0.0