Quick Python Question


Hi guys,

Quick question here, If i ask a question and want the user to input an answer, how do I do it in the code.



For this site, currently we are using Python 2.7.x so would use, raw_input().

user = raw_input("Enter your answer: ")

Now their answer will be cached in user.

The resulting value will be of type string, so if you wish to obtain numeric input, then wrap that function call with a float() or int() depending on what you expect.


Thank you! :slight_smile:


could you explain, in python, number 15 how to fully solve? I kinda have a bug there with the run too, so I´d want to know how to solve fully and I maybe can pass it please