标签:命令 print target 打印 blank break bre its www
# coding=utf-8
# !/usr/bin/python
# 命令1
# count = 0
# while (count < 9):
# print ‘The count is:‘, count
# count = count + 1
# print "Good bye!"
# 命令2
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# for letter in ‘Python‘: # 第一个实例
# print ‘当前字母 :‘, letter
#
# fruits = [‘banana‘, ‘apple‘, ‘mango‘]
# for fruit in fruits: # 第二个实例
# print ‘当前字母 :‘, fruit
#
# print "Good bye!"
# 命令3
# i = 2
# while(i < 100):
# j = 2
# while(j <= (i/j)):
# if not(i%j): break
# j = j + 1
# if (j > i/j) : print i, " 是素数"
# i = i + 1
#
# print "Good bye!"
# 命令4:打印100以内的质数
# num=[];
# i=2
# for i in range(2,100):
# j=2
# for j in range(2,i):
# if(i%j==0):
# break
# else:
# num.append(i)
# print(num)
# 命令5:实现金字塔的效果
#*字塔
# i=1
# #j=1
# while i<=9:
# if i<=5:
# print ("*"*i)
#
# elif i<=9 :
# j=i-2*(i-5)
# print("*"*j)
# i+=1
# else :
# print("")
链接地址:https://www.w3cschool.cn/python/python-nested-loops.html
标签:命令 print target 打印 blank break bre its www
原文地址:https://www.cnblogs.com/wbly2019/p/11003385.html