-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModulo2.py
More file actions
38 lines (29 loc) · 1.15 KB
/
Modulo2.py
File metadata and controls
38 lines (29 loc) · 1.15 KB
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
'''Para teste retire os "#", os códigos foram testados e algumas
#soluções estão diferentes da proposta do curso
#2.1.12 LAB A função print() e seus argumentos
print('Programação','Essenciais','em', sep ='***', end='...')
print('Python')
#2.2.6 LAB Literais Python - strings
print('"Eu sou"','""aprendizado""','"""Python"""',sep ='\n')
#2.4.7 LAB Variáveis
#Versão 1 - extramemnte limitada
john = 3
mary = 5
adam = 6
total_apples = (int(john+mary+adam))
print(john,mary,adam, sep = '\n')
print(total_apples)
#Versão 2 - Interativa
nome1= str(input('digite o nome:'))
nome2= str(input('digite segundo nome:'))
nome3= str(input('digite o terceiro nome:'))
fruta = str(input('Digite qual fruta:'))
qtd1= int(input(f'Digite numero de {fruta} que {nome1.upper()} possui:'))
qtd2= int(input(f'Digite numero de {fruta} que {nome2.upper()} possui:'))
qtd3= int(input(f'Digite numero de {fruta} que {nome3.upper()} possui:'))
soma = (qtd1+qtd2+qtd3)
#print(f'a soma total de {fruta}(s) é de {soma}\n',
# f'{nome1} possui {qtd1} {fruta}(s)\n',
#f'{nome2} possui {qtd2} {fruta}(s)\n',
# f'{nome3} possui {qtd3} {fruta}(s)\n',
#"FIM")'''