A Pen by guilherme daniel on CodePen.
This file contains 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
def main(): | |
print("Hello!") | |
main() |
This file contains 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
CREATE TABLE LEITOR | |
(COD_LEITOR INT NOT NULL PRIMARY KEY, | |
NOME_L VARCHAR(30)); | |
CREATE TABLE FUNCIONARIO | |
(COD_FUNC INT NOT NULL PRIMARY KEY, | |
NOME_F VARCHAR(30)); | |
CREATE TABLE TITULO | |
(COD_TIT INT NOT NULL PRIMARY KEY, |
This file contains 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
class Calcula{ | |
private _media14: number; | |
private _mediaDia: number; | |
constructor(media14, mediaDia){ | |
this.setMedia14(media14); | |
this.setMediaDia(mediaDia); | |
} | |
set setMedia14(valor:number){ |
This file contains 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
-- trigger function | |
CREATE OR REPLACE FUNCTION f_altera_status_reserva() | |
RETURNS TRIGGER AS $$ | |
DECLARE | |
titulo_reservado int; | |
codigo_do_leitor int; | |
BEGIN | |
-- | |
select cod_tit into titulo_reservado from livro where cod_livro in (select cod_livro from item_emprestimo); | |
select cod_leitor into codigo_do_leitor from emprestimo where cod_emprestimo in (select cod_emprestimo from item_emprestimo); |
This file contains 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
-- 2)Crie um trigger que altere o status da reserva de um leitor para I (Inativo) | |
-- sempre que ele tomar emprestado o livro do título que ele reservou | |
-- trigger function | |
CREATE OR REPLACE FUNCTION f_altera_status_reserva() | |
RETURNS TRIGGER AS $$ | |
DECLARE | |
titulo_reservado int; | |
codigo_do_leitor int; | |
BEGIN |
This file contains 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
export interface Person { | |
name: string; | |
age: number; | |
} | |
export interface Job { | |
jobName: string; | |
jobSalary: number; | |
} |
This file contains 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
def main(): | |
rodada = 1 | |
while rodada <= TOTAL_TENTATIVAS: | |
print('-' * 30) | |
print(f"Tentativa {rodada} de {TOTAL_TENTATIVAS}!") | |
chute = int(input('Numero: ')) | |
print('Você digitou: ', chute) | |
valor = compara_numeros(NUMERO_SECRETO, chute) | |
print('você acertou' if valor else 'você errou') | |
if valor: |
This file contains 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
def main(): | |
palavras_chutadas = [] | |
tela = cria_exibicao() | |
total_tentativas = 6 | |
acertou_palavra = False | |
forca = False | |
while not forca and not acertou_palavra: | |
print('-'*30) | |
chute = input('Chute: ') |
A Pen by guilherme daniel on CodePen.
OlderNewer