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
import pygame | |
class Flappy: | |
def __init__(self): | |
self.flappy = pygame.image.load('imagens/flappybird1.png') | |
class Janela: |
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 mmc(m, n): | |
divisor = 2 | |
multiplicador = 1 | |
while m != 1 or n != 1: | |
if m % divisor == 0 or n % divisor == 0: | |
multiplicador *= divisor | |
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
/** | |
* Autor: José Lucas | |
* Arquivo: ExecucaoTeste.java | |
* Descricao: Programa para praticar o uso de classes e objetos | |
* Aula: PROO – Lab3 | |
* | |
**/ | |
import classes.Musica; |
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
""" | |
You are required to write a program to sort the (name, age, height) tuples by ascending order where name is string, age and height are numbers. The tuples are input by console. The sort criteria is: | |
1: Sort based on name; | |
2: Then sort based on age; | |
3: Then sort by score. | |
The priority is that name > age > score. | |
If the following tuples are given as input to the program: | |
Tom,19,80 | |
John,20,90 | |
Jony,17,91 |
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 fatorial(n): | |
fat = 1 | |
for i in range(n): | |
fat *= (n - i) | |
return fat | |
def decremento(n): | |
newNumber = "" |
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
n = int(input()) | |
n1 = int(input()) | |
n2 = int(input()) | |
n3 = n - (n1 + n2) | |
if n1 > n2 and n1 > n3: | |
print(n1) | |
elif n2 > n1 and n2 > n3: | |
print(n2) |
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
import sqlite3 | |
def create_table(): | |
c.execute('create table IF NOT EXISTS dados(id INTEGER PRIMARY KEY AUTOINCREMENT,\ | |
nome text,\ | |
data_nascimento text,\ | |
email text,\ | |
senha text)') | |
def read_data(): |
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
<!DOCTYPE html> | |
<html lang="pt-br" > | |
<head> | |
<meta charset="UTF-8"> | |
<title>Formulário de Login</title> | |
<link rel="stylesheet" href="{{ url_for('static', | |
filename="css/style.css") }}"> | |
</head> |
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
Building wheel for pillow (setup.py) ... error | |
ERROR: Command errored out with exit status 1: | |
command: /home/lucas/Documents/programacao/gerador-provas/venv/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1dogez7b/pillow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1dogez7b/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-s9_73yr7 --python-tag cp38 | |
cwd: /tmp/pip-install-1dogez7b/pillow/ | |
Complete output (172 lines): | |
running bdist_wheel | |
running build | |
running build_py | |
creating build | |
creating build/lib.linux-x86_64-3.8 |
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
import random | |
class Perceptron: | |
def __init__(self, limiar, parada, taxa_aprendizado = 0.1): | |
self.pesos = [] | |
self.limiar = limiar | |
self.parada = parada | |
self.taxa_aprendizado = taxa_aprendizado |
OlderNewer