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

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

[复制链接]

1

主题

34

回帖

1154

积分

版主

积分
1154
发表于 2021-12-12 11:36:34 | 显示全部楼层

回帖奖励 +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
回复

使用道具 举报

4

主题

49

回帖

142

积分

注册会员

积分
142
发表于 2021-12-12 10:15:48 | 显示全部楼层

回帖奖励 +40 金钱

tree = 0
total = 0

while True:
    tree =  tree + 1
    total =total +tree
    print(tree)
    print(total)
    if total >=120:
        break
回复

使用道具 举报

1

主题

22

回帖

1631

积分

金牌会员

积分
1631
发表于 2021-12-12 10:10:08 | 显示全部楼层
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
回复

使用道具 举报

0

主题

3

回帖

-37

积分

限制会员

积分
-37
发表于 2021-12-12 10:09:22 | 显示全部楼层

回帖奖励 +40 金钱

ree = 0
total = 0

while True:
    tree = tree + 1
    total = total + tree
    print(tree)
    print(total)
    if total >= 120:
        break
回复

使用道具 举报

0

主题

3

回帖

126

积分

注册会员

积分
126
发表于 2021-12-12 10:07:10 | 显示全部楼层
tree = 0
total = 0

while True:
    tree = tree + 1
    total = total + tree
    print(tree)
    print(total)
    if total >= 120:
        break


回复

使用道具 举报

0

主题

3

回帖

126

积分

注册会员

积分
126
发表于 2021-12-12 10:06:06 | 显示全部楼层

回帖奖励 +40 金钱

tree = 0
total = 0

while True:
    tree = tree + 1
    total = total + tree
    print(tree)
    print(total)
    if total >= 120:
        break
回复

使用道具 举报

0

主题

4

回帖

185

积分

注册会员

积分
185
发表于 2021-12-12 10:03:44 | 显示全部楼层

回帖奖励 +40 金钱

tree = 0
total = 0

while True:
    tree = tree + 1
    total = total + tree
    print(tree)
    print(total)
    if total >=120:
        break
回复

使用道具 举报

1

主题

22

回帖

1631

积分

金牌会员

积分
1631
发表于 2021-12-12 10:00:41 | 显示全部楼层

回帖奖励 +40 金钱

tree = 0
total = 0

while True
    tree = tree + 1
    total = total + total
    print(tree)
    print(total)
    if total >=120
        break
回复

使用道具 举报

2

主题

27

回帖

823

积分

高级会员

积分
823
发表于 2021-12-12 09:58:05 | 显示全部楼层

回帖奖励 +40 金钱

tree = 0
total = 0

while True:
    tree = tree +1
    total = total + tree
    print(tree)
    print(total)
    if total >=120:
        break
回复

使用道具 举报

0

主题

13

回帖

518

积分

高级会员

积分
518
发表于 2021-12-11 19:16:05 | 显示全部楼层

回帖奖励 +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
回复

使用道具 举报

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

本版积分规则

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