-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpratica02.py
More file actions
32 lines (28 loc) · 814 Bytes
/
pratica02.py
File metadata and controls
32 lines (28 loc) · 814 Bytes
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
a = 10
b = 5
print('Operadores Aritmeticos')
print(f'Adição -> {a} + {b} = {a + b}')
print(f'Subtração -> {a} - {b} = {a - b}')
print(f'Multiplicação -> {a} X {b} = {a * b}')
print(f'Divisão -> {a} / {b} = {a / b}')
print(f'Divisão Inteira -> {a} // {b} = {a // b}')
print(f'Exponenciação -> {a} ** {b} = {a ** b}')
print(f'Modulo -> {a} % {b} = {a % b}')
print()
print('===' * 15)
print('Concatenização(+) e Repetição(*)')
concatenizacao = 'A' + 'B' + 'C'
a_dez_vezes = 'A' * 10
tres_vezes_Anderson = 'Anderson / ' * 3
print('Concatenação = ', concatenizacao)
print('Repetição = ', a_dez_vezes)
print('Repetição = ', tres_vezes_Anderson)
print()
print('===' * 15)
print('Precedências')
print('1 - (n + n)')
print('2 - **')
print('3 - * / // %')
print('4 - + -')
print()
print('===' * 15)