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 math import inf | |
def maior_produto3(lista): | |
max_produto = -inf | |
maior_lista = [] | |
for i in range(len(lista)): | |
# Cópia da lista para poder apagar elemento |
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
matrix = [[' ' for j in range(50)] for i in range(15)] | |
xa = 5 | |
ya = 5 | |
xb = 45 | |
yb = 15 | |
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
import imposto | |
valor_bem = float(input("Digite o valor do produto aquirido\n")) | |
declarou = input("Voce declarou o bem?") | |
declarou_bool = False # declarando a variável para caso não entre no if sempre existir um valor | |
if declarou == "S": | |
declarou_bool = True |
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
import pygame | |
from random import randint, choice | |
WIDTH = 640 | |
HEIGHT = 480 | |
# Meteoro | |
# Criar | |
# Atualiza estado | |
# Desenhar |
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
import pygame | |
from random import randint, choice | |
WIDTH = 640 | |
HEIGHT = 480 | |
def inicializa(): | |
pygame.init() | |
w = pygame.display.set_mode((640, 480)) | |
pygame.key.set_repeat(50) |
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
#Controle de servo no Raspberry Pi | |
#Autor: Simon Monk | |
import RPi.GPIO as GPIO | |
import time | |
servo_pin = 18 | |
#Ajuste estes valores para obter o intervalo completo do movimento do servo | |
deg_0_pulse = 0.5 |
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
#Controle de servo no Raspberry Pi | |
#Autor: Simon Monk | |
import RPi.GPIO as GPIO | |
import time | |
servo_pin = 18 | |
angulo = 45 |
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
# -*- coding:utf-8 -*- | |
# Adapted from | |
# https://www.daniweb.com/programming/software-development/code/216550/tkinter-to-put-a-gif-image-on-a-canvas-python | |
import time | |
from tkinter import * | |
import time | |
from threading import Thread |