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
<Configuration> | |
<Add OfficeClientEdition="64" Channel="PerpetualVL2024"> | |
<Product ID="ProPlus2024Volume" PIDKEY="2TDPW-NDQ7G-FMG99-DXQ7M-TX3T2"> | |
<Language ID="pt-br" /> | |
</Product> | |
</Add> | |
<RemoveMSI /> | |
<Property Name="AUTOACTIVATE" Value="1" /> | |
</Configuration> |
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
'''Identificando Imagens Binárias | |
Dada uma imagem binária identifique suas regiões conexas utilizando estruturas de dados do Python. | |
A conexão não ocorre na diagonal, somente na horizontal e vertical. | |
Desejamos identificar os objetos conexos da imagem, ou seja, dada a matriz da imagem, seu programa deverá rotular os “pixels” da matriz de forma a identificar os objetos conexos nela contidos. | |
Seu programa deverá ser bastante eficiente, evitando percorrer toda a matriz de entrada várias vezes. | |
Uma estratégia que deverá ser implementada é a que descrevemos a seguir. | |
A matriz é varrida de cima para baixo e da esquerda para a direita. | |
Se um “pixel” tem valor 1, verificamos seu vizinho de cima e o da esquerda. | |
Se ambos são 0, um novo objeto começa neste pixel. Se um deles é 1, este pixel pertence ao objeto anterior. | |
Finalmente, se ambos os vizinhos têm rótulos diferentes, a matriz deverá ser corrigida para que ambos tenham o mesmo rótulo (ou seja, um dos rótulos vai desaparecer e todos os pixels daquele rótulo vão |
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
'''Prova Python para Zumbis realizada por Isabela Ilma Gonçalves e entregue no dia 21/08/2014''' | |
# Prova Final do PPZ. Prazo de entrega: meia noite do dia 31 de agosto. | |
# Esta provinha deve ser feita em Python 3. Procure utilizar alguma IDE | |
# que permita caracteres especiais. O IDLE do Python 3 é suficiente para | |
# isso. Você poderá consultar suas anotações pessoais ou qualquer docu- | |
# mentação sobre a sintaxe do Python e suas bibliotecas. No entanto não | |
# será permitida a consulta dos vídeos explicando as listas e nem do có- | |
# digo fonte de sua resolução, seja qual for sua origem. A pontuação mí- | |
# nima é de 60 pontos. Boa sorte! Obs: a identação abaixo é de 2 espaços | |
# ATENÇÃO: sempre visando o aprendizado do aluno não será tolerado o plá- |
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
#!/usr/bin/python -tt | |
# ExercÃcios by Nick Parlante (CodingBat) | |
# A. first_last6 | |
# verifica se 6 é o primeiro ou último elemento da lista nums | |
# first_last6([1, 2, 6]) -> True | |
# first_last6([6, 1, 2, 3]) -> True | |
# first_last6([3, 2, 1]) -> False | |
def first_last6(nums): | |
return |
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
ano = int(input("Ano: ")) | |
if ano % 4== 0: | |
if ano % 100 == 0: | |
if ano % 400 == 0: | |
print ("Bissexto") | |
else: | |
print ("Não Bissexto") | |
else: | |
print ("Bissexto") | |
else: |
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
function fizzBuzz(n) { | |
for (var i = 1; i <= n; i++) { | |
var f = i % 3 == 0, b = i % 5 == 0; | |
console.log(f ? b ? "FizzBuzz" : "Fizz" : b ? "Buzz" : i); | |
} | |
} |
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
41;5;4;52;30;33 | |
9;39;37;49;43;41 | |
36;30;10;11;29;47 | |
6;59;42;27;1;5 | |
1;19;46;6;16;2 | |
19;40;7;13;22;47 | |
56;38;21;20;3;5 | |
53;17;38;4;47;37 | |
55;43;56;54;8;60 | |
25;4;18;57;21;38 |
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
#Importa Bilblioteca | |
from operator import itemgetter | |
arquivo = open("megasena.txt", "r") | |
arquivo = arquivo.read() | |
megasena = arquivo.split("\n") | |
#print(megasena) |
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: cp1252 -*- | |
texto_A = '''cncdbm pjcjzct vdbbxdtw rfqsr mkt gvhkcsvw qcxr kmk pnhc zwwdsd pgjjhr lxzscps lmbjjx lgh mdcqlbwx ppzpvfbv vdszkb njv nvmfhshh ztvkmv dfbnht xfpj nlbcwrvv dcrzslrf wzb krdb zndtfmf fwwm vmqzmg cpcnpnww nkjk ncrmzr jfmcl hxr vcj wcptgbc gvbfxtbv wcjlrs psjc lrljqdct ltjwn vmhp wnlmw rkvg rtm djsv rwjls ngc zcjjttpt kbg tdjzcwj pmgtzlng zvtnbs svztn pctgq qnghqcch mclvp qdht cbk lvqckrl qmwknt cqw jfxzx tkljpkfc mjhskxjh lfjvrhr whshcrk kvtgzpl gxglr mpqxtbzb zbrpktxj knhmmtks mhj xdlsm wcc sbrkdjmh gpn vwddsdl mqfsrwt khhmfng qkkjgg qdr qlpt njq xlc jfhhv kgzsb lqncvrh jgw xhjk krprtxf dtrsfb rwtzbhs qbvvz nqbh pdfqlsv hhrrx pvf mdvcfqkt bsb gcnkszfk rkzlhbnx njfqrzxj gtvrwp cmgp qddg gqjjcbjw khlbtg cdswmbgb lmbfvsv nfhvn jbnplx gkh dmp hmnf bzrznlh vqdmjdsb ktbcx fgvsxzp gmv xftg lxtf dcxsrkl tzwvbkfq tpvdrlf khzzw srtfttv lmknq jvkwr bplzzpjw rgtrj gcmdfzdx ksptr jzdfqq xmtzz pkqxrsw gvwg fqppvgk hsc hdj gthkq trxl gkhp rbr skxpc lbkw bbdqpvn llshm bhrfvh gjw zgnlpgwl |
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
#Chamando as bibliotecas necessárias | |
import string | |
import urllib.request | |
import os | |
import random | |
import sys | |
#Declarando uma lista com os desenhos do Jogo | |
forca = [''' | |
--------------------------------------------------------- |
NewerOlder