当前位置:网站首页>Openjudge: upper and lower case letters are interchanged
Openjudge: upper and lower case letters are interchanged
2022-07-28 05:36:00 【Programmer system】
describe
Replace all uppercase letters in a string with lowercase letters , At the same time, replace lower case letters with upper case letters .
Input
The input line : The string to be exchanged .
Output
Output one line : String that completes the interchange ( String length is less than 80).
The sample input
If so, you already have a Google Account. You can sign in on the right.
Sample output
iF SO, YOU ALREADY HAVE A gOOGLE aCCOUNT. yOU CAN SIGN IN ON THE RIGHT.
Code
s = input()
for c in s:
if 'a' <= c <= 'z':
print(chr(ord(c) - 32 ),end="")
elif 'A' <= c <= 'Z':
print(chr(ord(c) + 32),end="")
else:
print(c,end="")边栏推荐
- oracle查看锁表语句、解锁方法
- Bean的作用域、执行流程、生命周期
- 科研论文写作方法:在方法部分添加分析和讨论说明自己的贡献和不同
- MySQL adds sequence number to query results
- lamda 获取当前循环数,AtomicInteger
- Writing methods of scientific research papers: add analysis and discussion in the method part to explain their contributions and differences
- IDEA配置 service(Run Dashboard) 服务,多模块同时启动
- Flask Development & get/post request
- 个人写的一个文件上传工具网站
- openjudge:判断字符串是否为回文
猜你喜欢

Scope, execution process and life cycle of bean

restFul接口使用个人总结

Distillation model diagram

First acquaintance with C language (2)

Fusiongan code learning (I)

Video twins: the starting point of informatization upgrading of smart Parks

ECCV22 最新54篇论文主图整理

多系统架构设计思考

Test Development - UI testing in automated testing

21 day SQL punch in summary
随机推荐
Fusiongan code learning (I)
MySQL practice 45 lectures
Long和Integer如何进行比较,为什么报错
C language: some self realization of string functions
接口幂等性问题
Redis' bloom filter
restFul接口使用个人总结
VMware Workstation 与 Device/Credential Guard 不兼容。禁用 Device/Credential Guard
Thesis writing function words
openjudge:找第一个只出现一次的字符
Example of main diagram of paper model
SSM project quick build project configuration file
Mabtis(一)框架的基本使用
Lamda gets the current number of cycles, atomicinteger
蒙特卡罗方法求解圆周率π并用turtle画点,以及完成进度条问题
论文模型主图范例
11. < tag dynamic programming and subsequence, subarray> lt.115. Different subsequences + Lt. 583. Deletion of two strings DBC
子父线程交互
架构设计思考合集
FusionGAN代码学习(一)