Ask coding questions

← Back to all posts
I need help
Finjax (1)

hi there!
i need your help. In my python skript is a invalid synax, but I don't find the Problemen!
If you could help me I would be very grateful.
With kind regards Finja

Comments
hotnewtop
ZhongRietveld (30)

I don't have a problem, can you tell which steps you did to make the problem?

Bookie0 (6281)

Please precise your problem; what exactly isn't working? What line?

Also, on line 40, you have some parentheses that aren't properly closed

# (str(punke_bus) --> extra opening paranthesis
# str(points)) --> extra closing paranthesis
print("Du hast heute dadurch das du dich mit Verkehrsmitteln bewegt hast " + (str(punkte_bus) + str(punkte_fahrrad) + str(punkte_auto) + str(points)) + " Punkte auf deinem CO2 Konto. Ein Mensch sollte 100 Punkte habe, dies entspricht 6,8kg CO2.")

# should look like this:

print("Du hast heute dadurch das du dich mit Verkehrsmitteln bewegt hast " + str(punkte_bus) + str(punkte_fahrrad) + str(punkte_auto) + str(points))+ " Punkte auf deinem CO2 Konto. Ein Mensch sollte 100 Punkte habe, dies entspricht 6,8kg CO2.")

And on lines 7, 11, 15, and 19 (where you're returning stuff in your functions, I think instead of this:

return CO2_berechnen (multiplikator, int(strecke))

The parentheses have to be stuck to C02_berechnen:

return CO2_berechnen(multiplikator, int(strecke))
# same for the others

Let me know if it's still not working or if you have any questions! :)

Good luck! :D