#九九乘法表 申小龙
i=1# 行=1
while i<10:
j=0 #列=0
while j<i: #当行小于列
j+=1#列+1
print("{}{}={}".format(j,i,ij),end=" ")
print()
i+=1
for i in range(1,10):
for j in range(1,i+1):
print("{}{}={}".format(i,j,ij),end=" ")
print()
i=1
while i<10:
j=0
while j<i:
j+=1
print("{}{}={}".format(j,i,ij),end=" ")
print()
i+=1
for i in range(1,10):
for j in range(1,i+1):
print("{}{}={}".format(i,j,ij),end=" ")
print()
i=1
while i<10:
j=0
while j<i:
j+=1
print("{}{}={}".format(j,i,ji),end=" ")
print()
i+=1
for i in range(1,10):
for j in range(1,i+1):
print("{}{}={}".format(i,j,ij),end=" ")
print()
i=1
while i<10:
j=0
while j<i:
j+=1
print("{}{}={}".format(j,i,ij),end=" ")
print()
i+=1
for i in range(1,10):
for j in range(1,i+1):
print("{}{}={}".format(j,i,ji),end=" ")
print()
i=1
while i<10:
j=0
while j<i:
j+=1
print("{}{}={}".format(j,i,ij),end=" “)
print()
i+=1
for i in range(1,10):
for j in range(1,i+1):
print(”{}{}={}".format(j,i,ij),end=" ")
print()
#比较大小
i=0
sum=0
while i<5: #从第0个开始输入5个数
data=int(input(“请输入:”)) #i=0 输入第一个数
if i==0: #i=0 输入第一个数
max=data #max=第一个数
min=data #min=第一个数
else: #i>0 输入接下来的数
if data>max: #如果下面的数大于第一个数
max=data #max=下面最大的数
elif data<min: # 如果下面的数小于第一个数
min=data # min=下面最小的数
sum+=data
i+=1
print(max,min,sum)
i=0
sum=0
while i<5:
data=int(input(“请输入”))
if i==0:
max=data
min=data
else:
if data>max:
max=data
elif data<min:
min=data
sum+=data
i+=1
print(max,min,sum)
i=0
sum=0
while i<6:
data=int(input(“请输入”))
if i==0:
max=data
min=data
else:
if data>max:
max=data
elif data<min:
min=data
sum+=data
i+=1
print(max,min,sum)
i=0
sum=0
while i<5:
data=int(input(“请输入”))
if i==0:
max=data
min=data
else:
if data>max:
max=data
elif data<min:
min=data
sum+=data
i+=1
print(max,min,sum)
i=0
sum=0
while i<5:
data=int(input(“请输入”))
if i==0:
max=data
min=data
else:
if data>max:
max=data
elif data<min:
min=data
sum+=data
i+=1
print(max,min,sum)
#求平均值
i=0
sum=0
while i<5:
data = int(input(“请输入第%d个数” % (i + 1)))
sum+=data
i+=1
print(sum)
print(sum/i)
i=0
sum=0
for i in range(5):
data=int(input(“请输入第{}个数”.format(i+1)))
sum+=data
print(sum)
print(sum/(i+1))
i=0
sum=0
while i<5:
data=int(input(“请输入第%d个数”%(i+1)))
sum+=data
i+=1
print(sum)
print(sum/i)
i=0
sum=0
for i in range(5):
data=int(input(“请输入第{}个数”.format(i+1)))
sum+=data
print(sum)
print(sum/(i+1))
i=0
sum=0
while i<5:
data=int(input(“请输入第%d个数”%(i+1)))
sum+=data
i+=1
print(sum)
print(sum/i)
i=0
sum=0
for i in range(5):
data=int(input(“请输入第%d个数”%(i+1)))
sum+=data
i+=1
print(sum)
print(sum/i)
i=0
sum=0
for i in range(5):
data=int(input(“请输入第{}个数”.format(i+1)))
sum+=data
print(sum)
print(sum/(i+1))
i=0
sum=0
while i<5:
data=int(input(“请输入第%d个数”%(i+1)))
sum+=data
i+=1
print(sum)
print(sum/i)
i=0
sum=0
for i in range(5):
data=int(input(“请输入第{}个数”.format(i+1)))
sum+=data
print(sum)
print(sum/(i+1))
#判断质数
a=int(input(“请输入”))
i=2
while i<a:
if a%i==0:
print(a,“不是质数”)
break
i+=1
else:
print(a,“是质数”)
for a in range(2,15):
i=2
while i<a:
if a%i==0:
break
i+=1
else:
print(a,“是质数”)
a=int(input(“请输入”))
i=2
while i<a:
if a%2==0:
print(a,“不是质数”)
break
i+=1
else:
print(a,“是质数”)
for a in range(2,43):
i=2
while i<a:
if a%i==0:
break
i+=1
else:
print(a,“是质数”)
a=int(input(“请输入”))
i=2
while i<a:
if a%i==0:
print(a,“不是质数”)
break
i+=1
else:
print(a,“是质数”)
for a in range(2,98):
i=2
while i<a:
if a%i==0:
break
i+=1
else:
print(a,“是质数”)
a=int(input(“请输入”))
i=2
while i<a:
if a%i==0:
print(a,“不是质数”)
break
i+=1
else:
print(a,“是质数”)
for a in range(2,100):
i=2
while i<a:
if a%i==0:
break
i+=1
else:
print(a,“是质数”)
a=int(input(“请输入”))
i=2
while i<a:
if a%i==0:
print(a,“不是质数”)
break
i+=1
else:
print(a,“是质数”)
for a in range(3,55):
i=2
while i<a:
if a%i==0:
break
i+=1
else:
print(a,“是质数”)
#字符串换行输出
a=“123124254564756843645asdasfs”
i=0
while i<len(a):
print(a[i],end=" ")
if (i+1)%3==0:
print()
i+=1
a=“123124254564756843645asdasfs”
i=0
count=1
line=1
while i<len(a):
print(a[i],end=" ")
if line==count:
print()
count=0
line+=1
count+=1
i+=1
a=“123124254564756843645asdasfs”
i=0
while i<len(a):
print(a[i],end=" ")
if (i+1)%5==0:
print()
i+=1
a=“123124254564756843645asdasfs”
i=0
count=1
line=1
while i<len(a):
print(a[i],end=" ")
if count==line:
print()
count=0
line+=1
count+=1
i+=1
a=“123124254564756843645asdasfs”
i=0
while i<len(a):
print(a[i],end=" ")
if (i+1)%6==0:
print()
i+=1
a=“123124254564756843645asdasfs”
i=0
count=1
line=1
while i<len(a):
print(a[i],end=" ")
if count==line:
print()
count=0
line+=1
count+=1
i+=1
a=“123124254564756843645asdasfs”
i=0
while i<len(a):
print(a[i],end=" ")
if (i+1)%3==0:
print()
i+=1
a=“123124254564756843645asdasfs”
i=0
count=1
line=1
while i<len(a):
print(a[i],end=" ")
if count==line:
print()
count=0
line+=1
count+=1
i+=1
a=“123124254564756843645asdasfs”
i=0
while i<len(a):
print(a[i],end=" ")
if (i+1)%70:
print()
i+=1
‘’’
a=“123124254564756843645asdasfs”
i=0
count=1
line=1
while i<len(a):
print(a[i],end=" ")
if countline:
print()
count=0
line+=1
count+=1
i+=1
#每个五遍 申小龙