Commit 8ff5ab4d by BellCodeEditor

auto save

parent fd037b99
a = int(input("输入整公里数"))
b = 13
c = int(2.3)
d = int(3.45)
if a <= 3:
print('%.2f'%b)
elif a > 3 and a <= 15:
print('%.2f'%((a - 3)* c + b))
else:
print('%.2f'%((a - 15)* d + (15 - 3)* c + b))
\ No newline at end of file
import turtle
a = 20
turtle.pencolor("red")
for i in range(300):
turtle.forward(a)
turtle.left(90)
a += 2
turtle.done()
\ No newline at end of file
a = "白日依山尽"
b = "黄河入海流"
c = "欲穷千里目"
d = "更上一层楼"
print(a,",",b,".",c,",",d,".")
\ No newline at end of file
a = input("请输入一个日期:(格式为'月/日/年')")
b = a.split("/")
c = b[0]
d = b[1]
e = b[2]
months = ['January','February','March','April','May','June','July','August','Septeber','October','November','December']
c = months[int(c) - 1]
print("日期是:"+ c +' '+ d +','+ e)
\ No newline at end of file
a = int(input("请输入星期几:(数字形式)"))
b = ["星期一","星期二","星期三","星期四","星期五","星期六","星期日"]
c = b[a - 1]
print(c)
\ No newline at end of file
c = 0
for i in range(10,100,1):
a = i // 10
b = i % 10
if a == b:
i = i
else:
i = i + 1
c = c + 1
print(c)
\ 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