This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
APLICAÇÃO - UniSuporte (Sistema de gerenciamento na manutenção de computadores) | |
''' | |
import sqlite3 | |
banco = sqlite3.connect('uniSuporte.db') | |
sql = banco.cursor() | |
opcao = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
ATIVIDADE: Criar uma lista de nomes de filmes | |
O algoritmo deve permitir: | |
- Cadastrar um novo filme | |
- Mostrar os filmes cadastrados na lista | |
- Remover um filme | |
''' | |
filmes = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
quartos = {} | |
contiua_cadastro = "SIM" | |
print(''' | |
Software para reserva de quartos | |
[1] - Nova Reserva | |
[2] - Remover Reserva | |
[3] - Exibir Relatório | |
[4] - Sair do Programa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Hotel Bom Descanso - Software para reserva de quartos | |
''' | |
quartos = {} | |
contiua_cadastro = "SIM" | |
while (contiua_cadastro.upper() == "SIM"): | |
quarto = input('Informe o número do quarto: ') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numero = int(input("Informe um número: ")) | |
for tabuada in range(0, 11): | |
print('{} X {} = {}'.format(numero, tabuada, numero * tabuada)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for par in range(1, 51): | |
if par % 2 == 0: | |
print(par) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
times = ('São Paulo', 'Santos', 'Palmeiras', 'Corinthians', 'Chapecoense', 'Ponte Preta', 'Botafogo', 'Santo André', | |
'Ituano', 'Guarani') | |
print('') | |
# A) Os 5 primeiros | |
print(f'Os 5 primeiros: {times[:5]}') | |
# B) Os últimos 4 colocados | |
print(f'Os últimos 4 colocados: {times[-4:]}') | |
# C) Times em ordem alfabética | |
print(f'Times em ordem alfabética: {sorted(times)}') | |
# D) Em que posição está o time da Chapecoense |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numero = int(input('Digite um número: ')) | |
x = 0 | |
while (x <= 10): | |
# Multiplicação do número | |
mult = x * numero | |
print('{} X {} = {}'.format(x, numero, mult)) | |
# Somando mais 1 | |
x = x + 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint | |
# Jogo Pedra, Papel e Tesoura | |
objetos = ('Pedra', 'Papel', 'Tesoura') | |
numero = randint(0,2) | |
print('') | |
print('Escolha uma opção:') | |
print('1 - Pedra') | |
print('2 - Papel') | |
print('3 - Tesoura') | |
print('') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nota1 = float(input('Informe uma nota: ')) | |
nota2 = float(input('Informe uma nota: ')) | |
nota3 = float(input('Informe uma nota: ')) | |
media = ((nota1 + nota2 + nota3) / 3) | |
if media >= 7: | |
print('APROVADO') | |
elif media >= 5 and media <= 6.9: | |
print('RECUPERAÇÃO') | |
else: |
NewerOlder