-4
循环这是我第一次尝试了,虽然在蟒蛇循环,我陷入对于和虽然蟒蛇
这里是我的代码...
print("Hello and welcome to the programme")
x = 0
y = 0
while (x < 100):
print ('The count is: ', x + y)
y = x + y
x = x + 1
print ("The final answer is:", y)
print("Good Bye")
---------------------------------------
x = 0
y = 1
numberlist = (x + y)
for numbers in numberlist:
print(int("count is "+ numbers))
我列入,而原因循环是因为我希望for循环的工作方式与while循环和同一个程序完全相同。
在此先感谢。
我最好给你的建议是去并做一些python初学者教程。例如,在codeacademy.org上有一个,在udacity.com上有一对是初学者 – Totem 2014-11-21 13:59:51