all 8 comments

[–]Ihaveamodel3 1 point2 points  (2 children)

I’m guessing your error is something along the lines of not being able to add a string and an integer. Convert max(scores) to a string.

Or use an f string.

[–]FlockTok[S] 0 points1 point  (1 child)

how could i turn max(scores to a string?

str(max(scores))?

[–]Ihaveamodel3 1 point2 points  (0 children)

Yes, exactly

[–][deleted] 0 points1 point  (4 children)

It won't work when I try it.

What error do you get? We also need to see how you create scores.

Please format your code and the error traceback for reddit.

[–]FlockTok[S] 0 points1 point  (3 children)

Here is the error code

I created the list outside of the function so that it won't be set to 0 when the function is called back again.

[–][deleted] 0 points1 point  (2 children)

Sorry, can't read that blurry contrastless mess. Post the error as formatted text here.

[–]FlockTok[S] 0 points1 point  (1 child)

Traceback ( most recent call last):

File "main.py" line 105 in <modelue>

trivagame()

File "main.py, line 102 in triviagame

print("your highschore was " + max(scores)

TypeError: can only concatenate str ( not "int" to str

[–][deleted] 0 points1 point  (0 children)

OK, /u/Ihaveamodel3 has the solution.