Skip to content

Commit c65b9df

Browse files
committed
importando módulos
1 parent 36ed3c5 commit c65b9df

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

__pycache__/pizza.cpython-310.pyc

442 Bytes
Binary file not shown.

making_pizzas.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import pizza
2+
# importando o modulo todo
3+
pizza.make_pizza(16, 'pepperoni')
4+
pizza.make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese')
5+
6+
from pizza import make_pizza
7+
# importando apenas a função make_pizza do módulo pizza
8+
make_pizza(16, 'pepperoni')
9+
make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese')
10+
11+
12+
from pizza import make_pizza as mp
13+
# importando a função mp do módulo make_pizza como mp
14+
mp(16, 'pepperoni')
15+
mp(12, 'mushrooms', 'green peppers', 'extra cheese')

pizza.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def make_pizza(size, *toppings):
2+
"""Apresenta a pizza que estamos prestes a preparar"""
3+
print(f'\nMaking a {size}-inch pizza with the following toppings:')
4+
for topping in toppings:
5+
print(f'{topping}')

0 commit comments

Comments
 (0)