I want to ask the following questions:
What is the team name?
How many points did (team_name) score?
I've tried the this and have gotten back an error:
team_name = input("What is the team name? ")
points = input("How many points did", team_name, "score? ")
please help!
Here's a python3.6 way of doing this:
points = input(f"How many points did {team_name} score?")
What error are you getting?
I'm fairly confident your problem is that you are passing three parameters to input on the second line, instead of concatenating the strings which I think you're trying to do here.
Try:
points = input("How many points did " + str(team_name) + " score?")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With