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

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

[复制链接]

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
回复

使用道具 举报

4

主题

47

回帖

-139

积分

限制会员

积分
-139
发表于 2021-12-11 19:11:54 | 显示全部楼层

回帖奖励 +40 金钱

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

使用道具 举报

8

主题

73

回帖

2767

积分

金牌会员

河豚绿植

积分
2767
发表于 2021-12-11 19:10:08 | 显示全部楼层

回帖奖励 +40 金钱

  1. tree = 0
  2. total = 0
  3. while True:
  4.     tree+=1
  5.     if tree%3 != 0:
  6.         total+=tree
  7.     if total >= 120:
  8.         print('第'+str(tree)+'棵树可以摘完120个桃子')
  9.         break
复制代码
回复

使用道具 举报

0

主题

2

回帖

147

积分

注册会员

积分
147
发表于 2021-12-11 15:33:29 | 显示全部楼层

回帖奖励 +40 金钱

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

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

使用道具 举报

0

主题

10

回帖

343

积分

中级会员

积分
343
发表于 2021-12-11 15:31:03 | 显示全部楼层

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

使用道具 举报

1

主题

14

回帖

-158

积分

限制会员

积分
-158
发表于 2021-12-11 15:28:36 | 显示全部楼层

回帖奖励 +40 金钱

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

使用道具 举报

0

主题

10

回帖

343

积分

中级会员

积分
343
发表于 2021-12-11 15:14: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)+'桃子摘够了')
    berak
回复

使用道具 举报

3

主题

42

回帖

784

积分

高级会员

积分
784
发表于 2021-12-11 15:13:08 | 显示全部楼层
tree=0
total=0
While Frue
    tree=tree+1
    if tree%3=0totai
    print(tree)
    print(total)
    if total>=120
        print(de+strh)
    brenk
回复

使用道具 举报

2

主题

21

回帖

567

积分

高级会员

积分
567
发表于 2021-12-11 15:08:18 | 显示全部楼层
tree = 0
total = 0

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

使用道具 举报

2

主题

21

回帖

567

积分

高级会员

积分
567
发表于 2021-12-11 15:07:46 | 显示全部楼层

回帖奖励 +40 金钱

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

使用道具 举报

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

本版积分规则

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