-
Notifications
You must be signed in to change notification settings - Fork 0
/
funcoes.py
54 lines (45 loc) · 910 Bytes
/
funcoes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
def saudade():
print("ola, seja bem vindo!")
saudade()
'''
def soma (a, b):
return a + b
resultado=soma(2,3)
print(resultado)
def calcularmedia(listanumeros):
total = sum(listanumeros)
quantidade = len(listanumeros)
media = total / quantidade
return media
numero = [2, 4, 6, 8, 10]
resultado = calcularmedia(numero)
print(resultado)
n1=50
n2=20
def soma():
r=n1+n2
print("Soma de" +str(n1)+ " e " +str(n2) + +str(r))
print ("hello python")
return soma
n1=50
n2=20
def multi():
r=n1+n2
print("Soma de" +str(n1)+ " e " +str(n2) + +str(r))
print ("hello python")
return multi
n1=50
n2=20
def divi():
r=n1/n2
print("Soma de" +str(n1)+ " e " +str(n2) + +str(r))
print ("hello python")
return divi
n1=50
n2=20
def subi():
r=n1-n2
print("Soma de" +str(n1)+ " e " +str(n2) + +str(r))
print ("hello python")
return subi
'''