Currently working on statistics calculator but an error message saying invalid syntax which points at print in the mode section
import statistics
amountOfNumbers = input("How many numbers are you using? ")
usersNumbers = input("What are your numbers? ")
print("Mean: " , statistics.mean(usersNumbers)
print("Mode: " , statistics.mode(usersNumbers))
print("Median: " , statistics.median(usersNumbers))
Error message reads:
File "D:\Luke's Coding stuff\Python\bot1.py", line 5
print("Mode: " , statistics.mode(usersNumbers))
^
SyntaxError: invalid syntax
CodePudding user response:
the problem is on the line before the problem,you need put this:
print("Mean: " , statistics.mean(usersNumbers))
you forgot the parenthesis, I hope it helps you.
CodePudding user response:
The problem is actually in the line above it, you missed a bracket.
print("Mean: " , statistics.mean(usersNumbers))
The reason it told you there was a syntax error in line 5 is because it expected the code to follow the print function's "value" syntax.
CodePudding user response:
You are missing a closing parentheses after your first print statement.