新的Python程序员我怎样才能更容易/更好地做到这一点?

时间:2015-06-25 07:03:41

标签: python

项目规则:http://www.reddit.com/r/beginnerprojects/comments/19kxre/project_99_bottles_of_beer_on_the_wall_lyrics/

我在 Python 3.4中的项目代码:

for x in reversed (range(2, 100)):
print(x,end="") 
print (" bottles beer on the wall take one down ",end="")
print ("pass it round now ",end="") 
print (x-1)

b = 1
c = 0
print (b,end="")
print (" bottle beer pass around now ", end="")
print (c,end="")
print (" bottles left ! aw man I get no beer :(")`

1 个答案:

答案 0 :(得分:0)

扰流警报http://www.99-bottles-of-beer.net/language-python-1327.html

正如评论所说,对缩进非常小心! 如果您想要一个没有缩进的版本...... http://www.99-bottles-of-beer.net/language-python-748.html

要真正有创意,请仅使用这些链接获取灵感。