سؤال

I am using the PyScripter integrated development environment and taking courses using Python 2.7.

Why does number = input("some input text") immediately display the python input dialog when the program is ran? Wouldn't we have to execute it? Because really, it's just setting a variable to a python input. It never says to execute it? Is number not just any variable?

There's a mini-forum which the site that I go to has, but have not received an answer in 5 days, so I came here.

هل كانت مفيدة؟

المحلول

Indeed number is variable and nothing more. See documentation on input().

نصائح أخرى

python is just kind off a simple language, it does not need variable declaration for example. But it's better that it automatically asks your input instead that you have to write the code for starting the variable

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top