1 Star 0 Fork 0

toliong/pythonbasic

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
jindutiao.py 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
toliong 提交于 2020-04-02 10:20 . add file
# 进度条
# import time
# lenth = 50
# print("开始执行".center(40,'.'))
# start = time.perf_counter()
# for i in range(lenth+1):
# part1 = "*" * i
# part2 = "." * (lenth-i)
# completePersent = i / lenth * 100
# execTime = time.perf_counter()
# print("\r{:^3.0f}%[{}{}]{:.2f}s".format(completePersent, part1, part2,execTime-start), end='')
# time.sleep(0.1)
# print("\n"+'结束任务'.center(40,'.'))
# scale = 50
# print("执行开始".center(scale//2,'-'))
# start = time.perf_counter()
# for i in range(scale+1):
# a = '*' * i
# b = '.' * (scale - i)
# c = (i/scale)*100
# dur = time.perf_counter() - start
# print("\r{:^3.0f}%[{}{}]{:.2f}s".format(c,a,b,dur),end='')
# time.sleep(0.1)
# print("\n"+"执行结束".center(scale//2,'-'))
# a = 1111.23412356789
# print("{:-^20}".format(pow(a,3)))
# a = 3
# for i in range(1,a+1,2):
# print("{:^{}}".format(i*'*', a))
words = "abcdefghijklmnopqrstuvwxyz"
secret = "defghijklmnopqrstuvwxyzabc"
input_word = "python is good"
# for i in input_word:
# if i in words:
# print(secret[words.index(i)], end='')
# else:
# print(i,end="")
# print()
print(ord('a'))
print(ord('d'))
print(ord('z'))
print(pow(-1,0.5))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/toliong/pythonbasic.git
git@gitee.com:toliong/pythonbasic.git
toliong
pythonbasic
pythonbasic
master

搜索帮助