Skip to content

Instantly share code, notes, and snippets.

@Maransatto
Created September 18, 2019 17:43
Show Gist options
  • Save Maransatto/55ab32149df2548aa9719ff29180ce61 to your computer and use it in GitHub Desktop.
Save Maransatto/55ab32149df2548aa9719ff29180ce61 to your computer and use it in GitHub Desktop.
Faz a média ao contrário
A = 80 # nota de 1 das provas
B = 0 # nota da prova que quero descobrir
M = 75 # média
# Dadas as notas, sei a média
# M = (A+B)/2
# print(M)
# Dadas a média e uma nota, sei a outra nota
B = (2*M)-A
print(B)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment