下面说法正确的是( )
a=[9,5,2,3,0,-9,5,0,7,-10] s,i=0,0
while a[i]!=0 and i<len(a) :
s+=1
i+=1
运行该程序后s的值为( )
import turtle
n=int(input("输入 n:"))
for i in range(n*3):
turtle.forward(100)
turtle.left(360//n+2)
turtle.hideturtle()
若输入n的值为4,则绘制的图形为以下哪一项( )
def gcd(a,b):
c=a%b
while c > 0:
a,b =b,c
c=a%b
return b
a=int (input("请输入: "))
b=int (input("请输入: "))
gcd = gcd(a, b)
scm=a*b//gcd
print( gcd, scm)
运行该程序,输入a,b的值分别为16,12,则输出gcd,scm的值分别为( )
s1=input("请输入:")
q="1357902468";s2=""
for ch in s1:
if "0"<=ch<="9":
s2+=q[int(ch)]
elif "a"<=ch<="z":
s2+=chr((ord(ch)-ord("a")+2)%26+ord("a"))
else:
s2+=ch
print(s2)
运行该程序,输入s1的值为"Mike122@qq.com",则s2的值为( )
number=int(input("请输入一个四位数:"))
a = number//1000
b =
c = number % 100 // 10
d = number % 10
if:
print(number,"是四叶玫瑰数")
else:
print(number,"不是四叶玫瑰数")
请回答下列问题:
level=input("请输入各门功课的学考等级:")
dic= {"A":10,"B":9,"C":7,"D":4}
score=0
for i in range(len(level)):
score = score +
print("你的学考成绩折算为:"+ )
图 a | 图 b |
import pandas as pd
import matplotlib.pyplot as plt
plt.rcParams["font.sans-serif"] = ["Simhei"]
df=pd.read_excel ("空气质量.xlsx")
df=df.head(24*7)
df_ave=df.groupby("日期",as_index=False). #日平均 AQI df_sort=df_ave.sort_values("AQI",ascending= )
plt.bar( ,df_sort["AQI"],label="日均空气质量指数")
plt.legend( )
plt.xlabel("日期")
plt.ylabel("AQI 值")
plt.title("湖州市 11 月第 1 周日均空气质量指数对比")
plt.show ()