-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuncao.py
84 lines (47 loc) · 1.51 KB
/
funcao.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# def boas_vindas():
# print('Olá, Marcos')
# print('Temos 5 laptops em estoque.')
# boas_vindas()
# def somar_dois_numeros():
# numero1 = 10
# numero2 = 5
# resultado = numero1 + numero2
# print(resultado)
# somar_dois_numeros()
# def boas_vindas(nome, quantidade):
# print(f'Olá, {nome}')
# print(f'Temos {str(quantidade)} laptops em estoque.')
# boas_vindas('Marcos', 10)
# boas_vindas('Ronaldo', 4)
# boas_vindas('Linda', 2)
# def boas_voindas(quantidade, nome='Guilherme'):
# print(f'Olá, {nome}')
# print(f'Temos {str(quantidade)} laptops em estoque.')
# boas_vindas(6)
# def boas_voindas(quantidade=5, nome='Guilherme'):
# print(f'Olá, {nome}')
# print(f'Temos {str(quantidade)} laptops em estoque.')
# boas_vindas()
# ERRADO Se for determinar algum valor default, ele precisa ser o último parâmetro
# def boas_voindas(quantidade=5, nome=):
# print(f'Olá, {nome}')
# print(f'Temos {str(quantidade)} laptops em estoque.')
# boas_vindas()
# def cliente1(nome):
# print(f'Olá, {nome}.')
# cliente1('Maria')
# def cliente2(nome):
# return f'Olá, {nome}.'
# cliente2('Guilherme')
# def soma(*numeros):
# resultado = 0
# for num in numeros:
# resultado += num
# return resultado
# x = soma(2, 3, 4, 7)
# print(x)
def agencia(**carro):
return carro
print(agencia(marca='Gol', cor='Branco', motor=1.0, placa=1234))
print(agencia(marca='Gol', cor='Azul', motor=1.0))
print(agencia(marca='Gol', cor='Vermelho'))