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.
2 Antworten
+ 1
Use multiple linea for more than one input. In your case
Input box:
2
1
+ 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())