+ 3
Someone can help me
https://sololearn.com/compiler-playground/c6XdF7vfyaYU/?ref=app
13 Answers
+ 5
What have you tried so far?
+ 2
Read the first comment and convert the inputs to integer.
The print function is misspelled.
+ 2
Remove lines 9, 11, 12, 14 and fix the spelling: The variables are "wins", not "win" and "ties", not "tie"
If the input was
inp = input()
we convert it to integer with the int() function
inp = input()
inp = int(inp)
+ 1
# Convert the values into numbers
wins = input()
ties = input()
# 1 win = 3 points
# 1 tie = 1 point
# Calculate the score
score = win*3+tie
# Concatenate the 2 strings to produce a message
message = "Score: " + str(score)
# Display the message
Print(message)
+ 1
Convert a string to an integer:
https://www.geeksforgeeks.org/convert-string-to-integer-in-JUMP_LINK__&&__python__&&__JUMP_LINK/
+ 1
you stored the number in x and y. you need to use the numbers to perform math operations.
either rename x and y to wins and ties or use x and y for computing the score.
0
How i can do that
0
I tried to do it li that in the exercise it doesnât work
0
I need when i enter 4 as wins and 3as ties, like wins =3point and ties = 1 the result has to be 15 points
But it doesnât work
0
Itâs work now thaks so much
0
This code works:
# Convert the values into numbers
wins = int(input())
ties = int(input())
# 1 win = 3 points
# 1 tie = 1 point
# Calculate the score
score = (wins*3 + ties)
# Display the message
print("Score:", score)