找回密码
 中文实名注册
搜索
楼主: admin

【Python作业】第三单元 第7课 小熊摘桃 综合项目

[复制链接]

2

主题

23

回帖

132

积分

注册会员

积分
132
发表于 2021-12-12 15:03:19 | 显示全部楼层

回帖奖励 +40 金钱

tree = 0
total = 0
while True:
    tree = tree + 1
    if tree % 3 !=0:
        total = total + tree
    print(tree)
    print(total)
    if total >= 120:
        print('第'+str(tree)+'棵的时候就够了')
        break


回复

使用道具 举报

3

主题

18

回帖

721

积分

高级会员

积分
721
发表于 2021-12-12 11:56:38 | 显示全部楼层

回帖奖励 +40 金钱

tree=0
total True:
    tree=tree+1
    if tree%3!=0:
        total = total+tree
        print(tree)
        print(total)
        if total>=120:
           print('第'+str(tree)+'棵的时候摘够了')
           break
回复

使用道具 举报

2

主题

15

回帖

662

积分

高级会员

积分
662
发表于 2021-12-12 11:48:59 | 显示全部楼层

回帖奖励 +40 金钱

tree=0
total=0
while True :
    tree=tree+1
    if tree%3!=0:
        total=total+tree
        print(tree)
        print(total)
        if total>=120:
            print('第'+str(tree)+'棵的时侯摘够了')
            break
回复

使用道具 举报

3

主题

21

回帖

1196

积分

金牌会员

积分
1196
QQ
发表于 2021-12-12 11:47:59 | 显示全部楼层

回帖奖励 +40 金钱

  1. tree = 0
  2. total = 0
  3. while True:
  4.     tree = tree+1
  5.     if tree%3!=0:
  6.         total = total + tree
  7.     print(tree)
  8.     print(total)
  9.     if total >= 120:
  10.         print('第'+str(tree)+'棵摘够啦')
  11.         break
复制代码
回复

使用道具 举报

20

主题

118

回帖

2853

积分

版主

积分
2853
发表于 2021-12-12 11:42:28 | 显示全部楼层

回帖奖励 +40 金钱

tree = 0
total = 0
while True:
    tree = tree + 1
    if tree% 3 !=0:
        total = total + tree
    print(tree)
    print(total)
    if total >=120:
        print('第'+str(tree)+'课的时侯摘够了')
        break
回复

使用道具 举报

2

主题

22

回帖

626

积分

高级会员

积分
626
发表于 2021-12-12 11:41:30 | 显示全部楼层

回帖奖励 +40 金钱

  1. tree = 0
  2. total = 0
  3. whlie true:
  4.     tree = tree+1`
  5.     if tree % 3! = 0:
  6.         total = total+tree
  7. print(tree)
  8. print(total)
  9. if total >=120
  10.     print('第' + str (tree) + '颗的时候ok')
  11.     break
复制代码


回复

使用道具 举报

11

主题

33

回帖

2947

积分

金牌会员

积分
2947
发表于 2021-12-12 11:40:08 | 显示全部楼层

回帖奖励 +40 金钱

tree=0
total=0
while True:
    tree=tree+1
    if tree%3!+0:
        total = total+tree
        print(tree)
        print(total)
        if total>+120:
            print(""+str()+"")
            brealc
回复

使用道具 举报

0

主题

17

回帖

-246

积分

限制会员

积分
-246
发表于 2021-12-12 11:39:58 | 显示全部楼层

回帖奖励 +40 金钱

tree = 0
total = 0
while True:
    tree = tree + 1
    if tree % 3 != 0:
        total = total + tree
    print(tree)
    print(total)
    if total >= 120:
        print('第' + str(tree) + '棵的时候摘够了')
        break
回复

使用道具 举报

3

主题

29

回帖

1871

积分

金牌会员

积分
1871
发表于 2021-12-12 11:39:29 | 显示全部楼层

回帖奖励 +40 金钱

  1. tree = 0
  2. total = 0
  3. while True:
  4.     tree = tree + 1
  5.     if tree% 3 !=0:
  6.         total = total + tree
  7.     print(tree)
  8.     print(total)
  9.     if total >=120:
  10.         print('第'+str(tree)+'课的时侯摘够啦')
  11.         break
复制代码


回复

使用道具 举报

10

主题

51

回帖

-270

积分

限制会员

sgsdgsg

积分
-270
发表于 2021-12-12 11:38:38 | 显示全部楼层

回帖奖励 +40 金钱

  1. tree = 0
  2. total = 0
  3. while True:
  4.     tree = tree+1
  5.     if tree % 3 ! = 0:
  6.         total = total+tree
  7.         print(tree)
  8.         print(total)
  9.     if total >= 120:
  10.         print('第'+str(tree)+'棵的时候摘桃')
  11.         break
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 中文实名注册

本版积分规则

快速回复 返回顶部 返回列表