Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
How do you divide in python
-
How do you divide in Pythonista?```
print ("hi")option = raw_input("Enter a input for meter: ")
feet = option / 0.3048
print (feet)
-
its just input and you need an number instead of a str
print("hi") option = input("Enter a input for meter: ") feet = float(option) / 0.3048 print(feet)
-
Note: in Python 3 you need to use
input
, but in Python 2 you need to useraw_input
to do the same thing. (Python 2 also has aninput
function, but that does something different.)If you're a beginner, I would stronly recommend using Python 3 and not Python 2. Python 3 the current version of the language, has some nice new features, and has less strange/confusing behavior than Python 2 in some places.