How to put a variable in the middle of print

Asked

Viewed 17 times

0

I am beginner in programming with python so my doubt is very basic, I wanted to put the value of "average" in the middle of print, how do I do this?

n1 = float(input("Informe sua primeira nota: "))
n2 = float(input("Informe sua segunda nota: "))
m = (n1+n2)/2
if m >= 4.0:
    if m >= 9.0: print("Sua media é  e voce esta aprovado nessa disciplina", m)
  • Use fString : print(f"Sua media é {m} e você esta aprovado nessa disciplina")

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.