hhjdsd
发表于 2020-4-25 15:15:12
不知这样符不符合题意呢?
xiaoxiaodebai
发表于 2020-4-26 12:16:03
i=1;
while i<=50:
if i%3!=0:
print(i);
i+=1;
麻麦皮
发表于 2020-4-27 06:15:14
我来混鱼币了{:5_97:}
i = 1
while i <= 50:
if i%3 != 0:
print(i)
i += 1
Dikkoo
发表于 2020-4-27 07:58:03
x = 1
while (1 <= x <= 50) :
if (x % 3 != 0) :
print(x)
x = x + 1
else :
x = x + 1
Pythonnewers
发表于 2020-4-27 13:45:27
i = 0
while i<50:
if i%3 ==0:
pass
else:
print(i)
i+=1
尤思帆
发表于 2020-4-27 16:06:43
也是小白
入坑鱼
发表于 2020-4-27 16:41:43
count = 1
while count <= 50:
if (count%3) != 0:
print(count)
count = count + 1
luxhalo
发表于 2020-4-27 16:43:24
n = 0
while n <= 50:
if n % 3 != 0:
print(n)
n += 1
不打工的秘密
发表于 2020-4-27 23:16:54
康康
一宿遗忘
发表于 2020-4-29 10:41:56
for i in range(1,50,1):
if i%3!=0:
print(i)
i+=1
土二奇
发表于 2020-4-29 13:09:01
for i in range(0,51):
if (i%3)!=0:
print(i)
274329663
发表于 2020-4-29 14:31:20
n = 1
while n <= 50:
if n % 3 != 0:
print(n)
n=n+ 1
Shalamaynel
发表于 2020-5-2 14:09:32
"""
使用whlie循环打印出1~50不是3的倍数的数
"""
i = 0
while i <= 50:
i += 1
if i % 3 == 0:
continue
print(i)
无花果之花
发表于 2020-5-3 08:29:40
本帖最后由 无花果之花 于 2020-5-3 09:00 编辑
i = 1
while(i <= 50):
if i % 3 != 0:
print(i)
i += 1
江少
发表于 2020-5-3 16:15:46
i = 1
while i < 51:
if i % 3 != 0:
print i
i += 1
else:
i += 1
重华与长庚
发表于 2020-5-4 14:33:36
print('------------------打出1-50不是3的倍数的数--------------')
i=0
while i<50:
i=i+1
if i%3 != 0:
print(i)
一颗冰糖吖
发表于 2020-5-4 14:59:52
for i in range(50):
if int(i + 1) % 3 != 0:
print(i + 1)
nice141
发表于 2020-5-6 09:17:24
哇瑟
lqyy
发表于 2020-5-7 09:08:39
for i in range (1, 51):
while i:
if i%3 != 0:
print(i)
i += 1
else:
i += 1
break
请问一下为什么我要加一个break才能正常运行呢?
如果不加的话就会一直往后面数,但我明明已经定了范围了
猪都会飙车
发表于 2020-5-7 16:01:40
i=0
while i<=50:
i+=1
if i%3 !=0:
print(i)