Commit 42c130a5 by BellCodeEditor

save project

parent d7e1d30b
a='what’s this?'
\ No newline at end of file
s=input('请输入要输入的内容:')
l=''
n=''
o=''
for i in s:
if i.isalpha():
l+=i
elif i.isdigit():
n+=i
else:
o+=i
print('字母'+l+'共有'+str(len(l))+'个')
print('数字'+n+'共有'+str(len(n))+'个')
print('其他'+o+'共有'+str(len(o))+'个')
\ No newline at end of file
a=int(input('请输入包裹的长(不加单位):'))
b=int(input('请输入包裹的宽(不加单位):'))
h=int(input('请输入包裹的高(不加单位):'))
while a<=80 and b<=80 and h<=80 and a*b*h==0 and a+b+h<=200:
print('不可以邮寄')
a=int(input('请输入包裹的长(不加单位):'))
b=int(input('请输入包裹的宽(不加单位):'))
h=int(input('请输入包裹的高(不加单位):'))
print('可以邮寄')
\ No newline at end of file
import turtle
pen=turtle.Pen()
pen.shape("turtle")
pen.penup()
pen.goto(-50,100)
pen.pendown()
for i in range(1):
pen.pensize(20)
pen.color("red")
pen.forward(200)
pen.right(135)
pen.color("green")
pen.forward(280)
pen.left(135)
pen.color("blue")
pen.forward(200)
pen.penup()
pen.circle(50,180)
turtle.done()
import turtle
pen=turtle.Pen()
pen.shape("turtle")
pen.left(45)
pen.forward(100)
pen.left(90)
pen.circle(50,180)
pen.left(180)
pen.forward(100)
pen.right(90)
pen.circle(-50,180)
pen.hideturtle()
turtle.done()
\ No newline at end of file
import random
player=input("请出拳:石头/剪刀/布")# 玩家出拳 player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player) print("玩家出拳:"+player)
list=["石头","剪刀","布"]
computer = random.choice(list)
if player==computer:
print("平局")
elif player=="石头"and computer=="剪刀":
print("恭喜,你赢了")
elif player=="剪刀"and computer=="布":
print("恭喜,你赢了")
elif player=="布"and computer=="石头":
print("恭喜你,你赢了")
else:
print("很遗憾,你输了")
\ No newline at end of file
if player==computer:
print("平局")
elif player=="石头"and computer=="剪刀":
print("恭喜,你赢了")
elif player=="剪刀"and computer=="布"
print("恭喜,你赢了)
elif player==""and computer=="石头":
print("恭喜你,你赢了")
else:
print("很遗憾,你输了")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment