Neste vídeo vamos aprender um pouco sobre funções/métodos em python.
Código:
def boasvindas():
print("Olá você está no código com funções")
def lerDados():
n1 = float(input("Digite um valor: "))
n2 = float(input("Digite outro valor:"))
print("N1:", n1)
print("N2:", n2)
return n1, n2
def calcularMedia(nota1, nota2):
m = (nota1 + nota2) / 2
return m
def mostrarMedia(media):
media = media + 2
print("Media final: ", media)
def main():
nota1 = nota2 = 0
boasvindas()
nota1, nota2 = lerDados()
mediaFinal = calcularMedia(nota1, nota2)
mostrarMedia(mediaFinal)
media = mediaFinal
main()
On this page of the site you can watch the video online Funções/Métodos em Python with a duration of hours minute second in good quality, which was uploaded by the user Fernando Emilio Puntel 21 June 2024, share the link with friends and acquaintances, this video has already been watched 147 times on youtube and it was liked by 6 viewers. Enjoy your viewing!