bryan.cheng04
Jul 09, 2018 - 21:50
How do you divide in Pythonista?```
print ("hi")
option = raw_input("Enter a input for meter: ")
feet = option / 0.3048
print (feet)
```
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 use raw_input to do the same thing. (Python 2 also has an input 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.