- num = input("請輸入最大值: ")
- num= int(num)
- result = 1
- if num >=1 and num <= 100:
- i = 1
- while i < num:
- i = i + 1
- result = int(result) * i
- if i % 5 == 0:
- #print(i)
-
- print("{}:{}".format(i,result))
- print("最終的結果是{}".format(result))
- else:
- print("請輸入一到一百的數(shù)字")
-
j = 0
-
while j <4:
-
i = 0
-
while i < 4:
-
i=i+1
-
print("口",end="")#不換行
-
j = j+1
-
print("")#開啟一個新行
j = 2
while j<= 1000:
num = j
i = 2
is_prime = True
while i < num:
if num % i == 0:
is_prime = False
break
i= i+1
if is_prime == True:
print("{}是質數(shù)".format(num))
j = j + 1
創(chuàng)新互聯(lián)始終堅持【策劃先行,效果至上】的經(jīng)營理念,通過多達十年累計超上千家客戶的網(wǎng)站建設總結了一套系統(tǒng)有效的全網(wǎng)營銷解決方案,現(xiàn)已廣泛運用于各行各業(yè)的客戶,其中包括:成都邊坡防護網(wǎng)等企業(yè),備受客戶認可。
網(wǎng)頁題目:階層計算器
本文鏈接:
http://weahome.cn/article/jhedgh.html