摘要:
1 string = input('请输入一个字符串:') 2 lists = list(string) 3 print('输入的字符串:', lists) 4 lists.reverse() 5 print('反转后的字符串:', lists) 6 i = 0 7 while i < len(li 阅读全文
posted @ 2019-04-16 19:02
Sakura媛媛
阅读(274)
评论(0)
推荐(0)
摘要:
1 days = 0 2 months = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] 3 year = int(input('请输入年份,如2004:')) 4 month = int(input('请输入月份,如12:')) 5 day = 阅读全文
posted @ 2019-04-16 19:01
Sakura媛媛
阅读(296)
评论(0)
推荐(0)
摘要:
1 # 1-100之间的质数 2 i = 2 3 while i <= 100: 4 j = 2 5 flag = True 6 while j < i: 7 if i % j == 0: 8 flag = False 9 break 10 j += 1 11 if flag: 12 print(i 阅读全文
posted @ 2019-04-16 14:52
Sakura媛媛
阅读(9856)
评论(0)
推荐(0)

浙公网安备 33010602011771号