0
votes

My code in Python is giving an error of invalid syntax in a simple expression,:

mediaa = float(input('Digite sua média anual: '))
recup = {60-(mediaa * 6)} / 4

Traceback (most recent call last): File "C:/Users/arthu/PycharmProjects/projeto-notas/nota-recuperação.py", line 2, in recup = {60-(mediaa * 6)} / 4 TypeError: unsupported operand type(s) for /: 'set' and 'int'

Process finished with exit code 1

1
Replace { } by ( ) - Sheldore

1 Answers

0
votes

You can't use { } when you mean ( ). The curly braces make it into a set, not an integer.

recup = (60-(mediaa * 6)) / 4