标签:ima 通过 多少 image block 国际象棋 python mes lan
# 方法一
i = 0
while i < 10:
print("★", end="")
i += 1
print()
# 方法二(通过变量的形式实现)
i = 0
str_var = ""
while i < 10:
strvar += "★"
i += 1
print(strvar)
i = 1
while i <= 10:
if i % 2 == 1:
print("★", end="")
else:
print("☆", end="")
i += 1
print()
i = 1
while i <= 100:
print("★", end="")
if i % 10 == 0:
print()
i += 1
print()
i = 1
while i <= 100:
if i % 2 == 0:
print("★", end="")
else:
print("☆", end="")
if i % 10 == 0:
print()
i += 1
print()
i = 0
while i < 100:
if i // 10 % 2 == 0:
print("★", end="")
else:
print("☆", end="")
if i % 10 == 9:
print()
i += 1
print()
i = 1
while i <= 100:
if i % 2 == 1:
print(i)
i += 1
i = 1
while i <= 100:
if i % 2 == 0:
print(i)
i += 1
i = 0
while i < 64:
# 判断当前是奇数行还是偶数行
if i // 8 % 2 == 0:
if i % 2 == 0:
print("□", end="")
else:
print("■", end="")
else:
if i % 2 == 0:
print("■", end="")
else:
print("□", end="")
# 第八个方块换行
if i % 8 == 7:
print()
i += 1
如题:我国最高山峰是珠穆朗玛峰:8848m,我现在有一张足够大的纸张,厚度为:0.01m。请问,折叠多少次,就可以保证厚度不低于珠穆朗玛峰的高度?
height = 0.01
times = 1
while True:
if height * 2 ** times >= 8848:
print(times)
break
times += 1
如题:篮球从十米的位置向下掉落,每一次掉落都是前一次的一半,问弹跳十次之后篮球的高度是多少?
times = 1
while True:
height /= 2
if times == 10:
print(height)
break
times += 1
标签:ima 通过 多少 image block 国际象棋 python mes lan
原文地址:https://www.cnblogs.com/kangyz/p/13867486.html