We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
以下代码用于实现ASCII码与字符相互转换:(来自菜鸟教程)
# Filename : test.py # author by : www.runoob.com # 用户输入字符 c = input("请输入一个字符: ") # 用户输入ASCII码,并将输入的数字转为整型 a = int(input("请输入一个ASCII码: ")) print( c + " 的ASCII 码为", ord(c)) print( a , " 对应的字符为", chr(a))
输入与输出
python3 test.py 请输入一个字符: a 请输入一个ASCII码: 101 a 的ASCII 码为 97 101 对应的字符为 e
The text was updated successfully, but these errors were encountered:
No branches or pull requests
输入与输出
The text was updated successfully, but these errors were encountered: