我发现我最近掉粉了,这才发觉:完了完了,我忘了我已经这么多天没有更新,我的情绪也慢慢的慌起来了,心想:嗯不能再拖更了。然后马上上电脑打上3组趣味代码
python的有趣代码、
import time
words = input('Please input the words you want to say!:')
for item in words.split():print('\n'.join([''.join([(item[(x-y) % len(item)] if ((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3 <= 0 else ' ') for x in range(-30, 30)]) for y in range(12, -12, -1)]))time.sleep(1.5)
这个是爱心的,只需要填入1个或者几个数字就会出现一个爱心
python编程100例、------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
print('\n'.join([' '.join(['%s*%s=%-2s' % (y, x, x*y) for y in range(1, x+1)]) for x in range(1, 10)]))
这个是九九乘法表😁😁😁
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# coding=utf-8
import random
# 获胜次数
win_times = 0
while win_times <= 2:player = input('请输入:剪刀(0) 石头(1) 布(2):')player = int(player)computer = random.randint(0,2)if ((player == 0) and (computer == 2)) or ((player ==1) and (computer == 0)) or ((player == 2) and (computer == 1)):win_times += 1print('获胜,哈哈,你太厉害了')elif player == computer:print('平局,要不再来一局')else:print('输了,不要走,洗洗手接着来,决战到天亮')
这个是剪刀石头布不的代码😁😁😁😁
python浪漫代码? -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
给个三连吧,各位大大😭😭
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态