The Importance of Being Down-to-earth
Nowadays, people are more and more obsessed with fame and fortune, and they tend to pursue a luxurious life. However, the importance of being down-to-earth is often overlooked. In fact, this virtue is essential to success in life.
For one thing, when people a...
When we think of the future, most of us picture a world where technology has taken over and replaced many of our daily tasks. But what if the future is not what we expected?
A recent study by researchers at the University of Oxford suggests that instead of technology taking over, it could be humans...
质数
# 使用for循环和if判断语句:
prime_numbers = []
for num in range(2,1001): # 0-1000中的所有质数从2开始,所以range是从2开始的。
for i in range(2,num): # 判断num是否为质数,即判断是否能够被小于它的数字整除。
if (num % i) == 0: # 如果能够被小于它的数字整除,说明不是一个质数。
break # 跳出当前循环,进行下一次循环。
else: ...