Skip to content

Commit 342efc4

Browse files
committed
Refeitos os exercicios 097, 098, iniciado o 099
1 parent c86f14f commit 342efc4

File tree

5 files changed

+70
-2
lines changed

5 files changed

+70
-2
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,7 @@ In the end, all will be stored in a dictionary, including the total goals scored
263263
* Ex095: 'Enhance CHALLENGE 093 to work with multiple players by incluidng a sistem to view each player's achievement details.'
264264
### Functions part 01:
265265
* Ex096: 'Made a program that has a function called area(), which receives the dimensions of a rectangular terrain (width and length) and shows the area of the terrain.'
266-
* Ex097: '
266+
* Ex097: 'Make a program taht has a function called write(), which takes any text as a parameter and displays a message with adatable size.'
267+
* Ex098: 'Make a program that has a function called larger(), which takes several integer-valued parameters.
268+
your program has to analyze all the highlights and say which one is the biggest.'
269+
* Ex100: '

README_ptbr.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,4 +262,12 @@ No final, tudo isso será guardado em um dicionário, incluindo o total de gols
262262
* Ex095: 'Aprimore o DESAFIO 093 para que funcione com vários jogadores, incluindo um sistema de visualização de detalhes do aproveitamento de cada jogador.'
263263
### Funções parte 01:
264264
* Ex096: 'Faça um programa que tenha uma função chamada área(), que receba as dimenções de um terreno retangular largura e comprimento) e mostre a área do terreno.'
265-
* Ex097: '
265+
* Ex097: 'Faça um programa que tenha uma função chamada escreva(), que receba um texto qualquer como parâmetro e mostre uma mensagem com tamanho adaptável.'
266+
* Ex098: 'Faça um programa que tenha uma função chamada contador(), que receba três parâmetros: Início, Fim e Passo.
267+
Seu programa tem que realizar três contagens através da função criada:
268+
* A - De 1 até 10, de 1 em 1
269+
* B - De 10 até 0, de 2 em 2
270+
* C - Uma contagem persoalidada.'
271+
* Ex099: 'Faça um programa que tenha uma função chamada maior(), que receba vários parâmetros com valores inteiros.
272+
Seu programa tem que analisar todos os claores e dizer quel deles é o maior.'
273+
* Ex100: '

reworked exercices/ex097.2.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Ex097.2
2+
"""Make a program taht has a function called write(), which takes any text as a parameter and displays a message with adatable size."""
3+
4+
def write(message):
5+
size = len(message) + 4
6+
print('\033[35m=\033[m' * size)
7+
print(f'\033[34m {message}\033[m')
8+
print('\033[35m=\033[m' * size)
9+
10+
write('Curso em Vídeo')
11+
write('Clayton Garcia da Silva')
12+
write('You are staking me right Jaguara hahaha')

reworked exercices/ex098.2.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Ex098.2
2+
"""Make a program that has a function called counter(), which takes three parameters: Start, End and Step.
3+
Your program has to performer three counts through the created function:
4+
A - From 1 to 10, from 1 to 1;
5+
B - From 10 to 0, every 2;
6+
C - A personalized count."""
7+
8+
from time import sleep
9+
10+
11+
def count(personality=False, start=1, end=10, step=1):
12+
if personality:
13+
while True:
14+
start = int(input('\033[32mStart: \033[m'))
15+
end = int(input('\033[32mEnd: \033[m'))
16+
step = int(input('\033[32mStep: \033[m'))
17+
if step == 0:
18+
print('\033[31mIt is impossible to perform this count!, try again\033[m')
19+
else:
20+
break
21+
print('\033[35m<>\033[m' * 25)
22+
print(f"\033[34mCounting from \033[35m{start}\033[34m to \033[35m{end}\033[34m in \033[35m{step}:\033[m")
23+
if step < 0:
24+
step = step * -1
25+
if start < end:
26+
for c in range(start, end + 1, step):
27+
print(c, end='\033[31m > \033[m', flush=True)
28+
sleep(0.5)
29+
print('Fim!')
30+
elif start > end:
31+
for c in range(start, end - 1, -step):
32+
print(c, end='\033[31m > \033[m', flush=True)
33+
sleep(0.5)
34+
print('Fim!')
35+
print('\033[35m<>\033[m' * 25)
36+
37+
38+
count(start=1, end=10, step=1)
39+
count(start=10, end=0, step=2)
40+
count(personality=True)
41+
print('xD')

reworked exercices/ex099.2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ex099.2
2+
"""Make a program that has a function called larger(), which takes several integer-valued parameters.
3+
your program has to analyze all the highlights and say which one is the biggest."""
4+

0 commit comments

Comments
 (0)