Commit 1ab80c99 by BellCodeEditor

auto save

parent 04e717b8
m=int(input())
n=int(input())
if m>n:
m,n=n,m
k=[]
for i in range(m,n+1):
if i%7==0 and i%5!=0:
k.append(str(i))
t=','.join(k)
print(t)
a=input()
a1,a2,a3,a4=0,0,0,0
for i in a:
if i.isalpha():
a1+=1
elif i.isspace():
a2+=1
elif i.isdigit():
a3+=1
else:
a4+=1
t=[a1,a2,a3,a4]
for i in t:
print(i)
\ No newline at end of file
a=list(map(int,input().split(',')))
t=0
for i in range(len(a)):
if a[i]>a[i+1]:
t+=(a[i]-a[i+1])*0.3
elif a[i+1]
\ No newline at end of file
a=int(input("请输入该儿童的足岁年龄:"))
sg=a*5+75
tz=a*2+8
print("该儿童的标准身高%s厘米"%sg)
print("该儿童的标准体重%s公斤"%tz)
\ No newline at end of file
import turtle
turtle.penup()
turtle.goto(-200,200)
turtle.pendown()
for i in range(4):
turtle.forward(400)
turtle.right(90)
turtle.forward(200)
turtle.pencolor("red")
turtle.right(90)
turtle.forward(400)
turtle.penup()
turtle.goto(-200,0)
turtle.pendown()
turtle.goto(200,0)
turtle.hideturtle()
turtle.done()
\ No newline at end of file
a=list(map(int,input().split(",")))
t=0
for i in range(len(a)-1):
if a[i]>a[i+1]:
t+=abs(a[i+1]-a[i])*0.3
elif a[i]<a[i+1]:
t+=a[i+1]-a[i]
print(t)
......@@ -3,14 +3,14 @@
scores = {'语文':89, '数学':95, '英语':80}
def get_average(dict_1)):
score = 0
def get_average(dict_1):
zcj = 0
for subject, score in scores.items():
score += score
print('现在的总分是%d'%score)
ave_score = score/len(scores)
zcj=zcj+score
print('现在的总分是%d'%zcj)
ave_score = zcj/len(scores)
print('平均分是%d'%ave_score)
get_average(scores)
\ 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