distance = input("Distance travelled: ")
passengers = input("Number of people travelling: ")
extra = (distance - 1)
extraCharge = (extra * 2)
cost = 3 + extraCharge
if passengers > 4:
charge = (cost / 2)
cost = (cost + charge)
print("Cost: " + (cost))
So this is my code, can't figure out what's wrong with it. Can someone help me? When I run it, it says EOF error on line 1
python
? – heemayl Dec 31 '17 at 18:01str
s get arithmetic operations whereasint
s are trying to be concatenate withstr
s. – Nae Dec 31 '17 at 18:05input
toraw_input
. – Ursus Dec 31 '17 at 18:10