2017-03-15 40 views
-5

我是新来的python,这仅仅是为了个人知识。接受用户输入并将其用于某个程序

所以,我怎么会设计一个程序把来自用户的号码输入N和从0到N打印出所有的数字..

+1

供参考:第一款谷歌结果把我带到那里。 Plesae做一些研究 –

+0

它不是我想要的,甚至没有关闭@ThomasWeller – sal

+0

然后请解释你已经有什么,以及你的问题与此不同。 –

回答

0

这一个工程

n = int(input("enter a number")) 
counts = 0 
print (0) 
while counts != n: 
    counts += 1 
    print(counts) 
    if counts == n: 
     break