Escolar Documentos
Profissional Documentos
Cultura Documentos
• Operadores aritméticos
• Operadores relacionais ou de comparação
• Operadores lógicos
• Tabelas de verdade
• Hierarquia das Operações Aritméticas
• Exercícios
2
OPERADORES ARITMÉTICOS
Operador Operação
+ Adição
- Subtração
* Multiplicação
/ Divisão
// Divisão inteira – Divide o dividendo pelo divisor, devolvendo o
valor obtido no quociente
% Módulo - Divide o dividendo pelo divisor, devolvendo o valor
obtido no resto
** Exponenciação – Valor da base elevado ao valor da potência
3
E XEMPLOS COM OPERADORES EM P YTHON
4
E XEMPLO COM OPERADORES EM P YTHON
5
OPERADORES DE ATRIBUIÇÃO
6
EXEMPLOS COM OPERADORES DE ATRIBUIÇÃO
8
E XEMPLO COM O PERADORES R ELACIONAIS
9
O PERADORES LÓGICOS
10
TABELAS DE V ERDADE DOS
O PERADORES LÓGICOS
• and, or, not
11
TABELAS DE V ERDADE DOS
O PERADORES LÓGICOS
• and, or, not
12
E XEMPLO COM O PERADORES L ÓGICOS
13
H IERARQUIA DAS O PERAÇÕES A RITMÉTICAS
14
E XEMPLODA APLICAÇÃO DAS REGRAS DE
PRIORIDADE DOS OPERADORES
15
C ÁLCULO DE EXPRESSÕES
EXPRESSÃO 1 EXPRESSÃO 2
16
E XERCÍCIOS COM EXPRESSÕES ARITMÉTICAS
17
E XERCÍCIOS COM EXPRESSÕES ARITMÉTICAS -
RESOLUÇÃO
P=3 e Q=2
a. P + Q * 5 = 3 + 2 * 5 = 3 + 10 = 13
b. (P + Q ) * 5 = (3 + 2 ) * 5 = 5 * 5 = 25
c. P + 5 * Q / 2 = 3 + 5 * 2 / 2= 3+10/2=3+5=8
18
E XERCÍCIOS COM EXPRESSÕES LÓGICAS
a. X > 0 ˅ X > 20
b. X > 5 ^ X >= 10
c. X= 10 ^ Y=5
19
E XERCÍCIOS COM EXPRESSÕES LÓGICAS -
RESOLUÇÃO
20
ATIVIDADE NO L EARNING A PPS
• https://learningapps.org/watch?v=p1caeanw223
21