Why is this not outputting correctly | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why is this not outputting correctly

I completed a challenge asking me to create a program that calculates points for a chess tournament. # Convert the values into numbers wins = int(input(1)) ties = int(input(3)) # 1 win = 3 points # 1 tie = 1 point # Calculate the score score = (3*wins + ties) # Concatenate the 2 strings to produce a message message = "Score: " + str(score) # Display the message print(message) The problem is that when i run it through python it dose not work as intended. The product of the whole program just spits out whatever is submitted to the "wins" input() I cannot, for the life of me, tell what is wrong here. Especially since I'm being told its correct on the problem i solved.

28th Dec 2023, 8:40 PM
Tyler Ervin
Tyler Ervin - avatar
2 Answers
+ 1
Use multiple linea for more than one input. In your case Input box: 2 1
28th Dec 2023, 10:09 PM
Jan Zalewski
+ 1
Tyler Ervin , Whenever you're writing code for an automated Sololearn test, don't add any prompts to the input calls, because the prompts get printed and won't match the expected output. In other words, leave them empty like this. wins = int(input()) ties = int(input())
29th Dec 2023, 1:55 PM
Rain
Rain - avatar