-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9d9994a
Showing
152 changed files
with
2,057 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
def perm(s, i=0): | ||
if i == len(s) - 1: | ||
print(s) | ||
else: | ||
for j in range(i, len(s)): | ||
t = s | ||
s = s[j] + s[:j] + s[(j + 1):] | ||
perm(s, i + 1) | ||
s = t | ||
perm('AB') | ||
|
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print("Olá Mundo") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
n=input("Qual o seu nome:") | ||
print("Seja bem vindo", n,"ao sistema") | ||
print("Seja bem vindo {} ao sistema".format(n)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
n1= int(input('Digite um número: ')) | ||
n2=int(input('Digite mais um número: ')) | ||
s= n1+n2 | ||
print("[PRINT RAIZ] A soma é: ",s) | ||
|
||
print("[PRINT NUTELLA] A soma é: {}".format(s)) | ||
|
||
print("O tipo de dado da variavel S é: ",type(s)) | ||
|
||
#comentário | ||
print("A soma entre",n1,"e",n2,"é=",s) | ||
#versão do python 3 | ||
print("A soma entre {} e {} é={} ".format(n1,n2,s)) | ||
|
||
print("############") | ||
#print(s.isnumeric()) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
n=input('Digite aqui:') | ||
print("Voce digitou {}".format(n)) | ||
print('###') | ||
print(type(n)) | ||
print(n.isalnum()) | ||
print(n.isalpha()) | ||
print(n.isdecimal()) | ||
print(n.islower()) | ||
print(n.isupper()) | ||
print(n.isprintable()) | ||
print(n.isalnum()) | ||
print(n.istitle()) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
n1= int(input('Digite um número: ')) | ||
n2=int(input('Digite mais um número: ')) | ||
|
||
print("A soma entre {} e {} é={} ".format(n1,n2,n1+n2)) | ||
print("############") | ||
print("A subtração entre {} e {} é={} ".format(n1,n2,n1-n2)) | ||
print("############") | ||
print("A multiplicação entre {} e {} é={} ".format(n1,n2,n1*n2)) | ||
print("############") | ||
print("A divisão entre {} e {} é={:.3f} ".format(n1,n2,n1/n2)) | ||
print("############") | ||
print("A potencia de {} elevado {} é={} ".format(n1,n2,n1**n2)) | ||
print("############") | ||
print("A potencia com POW de {} elevado {} é={} ".format(n2,n1,pow(n2,n1))) | ||
print("############") | ||
print("A divisão inteira de {} e {} é={} ".format(n1,n2,n1//n2)) | ||
print("############") | ||
print("#"*10) | ||
nome= str(input('Digite seu nome: ')) | ||
print("Prazer em te conhecer {}!".format(nome)) | ||
print("#"*10) | ||
print("[ESCREVE COM 20 ESPACO]Prazer em te conhecer {:20}!".format(nome)) | ||
print("#"*10) | ||
print("[ALINHADO A DIREITA 20 ESPACO]Prazer em te conhecer {:>20}!".format(nome)) | ||
print("#"*10) | ||
print("[ALINHADO A ESQUERDA 20 ESPACO]Prazer em te conhecer {:<20}!".format(nome)) | ||
print("#"*10) | ||
print("[CENTRALIZADO]Prazer em te conhecer {:^20}!".format(nome)) | ||
print("#"*10) | ||
print("[CENTRALIZADO COM UM SIMBOLO]Prazer em te conhecer {:=^20}!".format(nome)) | ||
print("Não vou deixar quebrar a linha.", end=' ') | ||
print("o barra n deixa quebrar. OLha aqui prazer {}\n seu lindo do \n universo.".format(nome), end=' ') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
print('Programa Leia um NÚMERO e exiba seu sucessor e antecessor') | ||
n1 = int(input('Digite um número:')) | ||
print('¨¨¨'*20) | ||
print('Você informou o número {}\nO número sucessor é {}\nO número antecessor é {}'.format(n1,n1+1,n1-1), end=' ') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
print('Receba um número e exiba o seu dobro, triplo e raiz quadrada') | ||
n1=int(input('Informe um número:')) | ||
print('¨¨¨'*20) | ||
print('O dobro de {} é:{}'.format(n1,n1*2)) | ||
print('O triplo de {} é:{}'.format(n1,n1*3)) | ||
print('[POW] A raiz quadrada de {} é:{}'.format(n1,pow(n1,1/2))) | ||
print('A raiz quadrada de {} é:{:.2f}'.format(n1,n1**(1/2))) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
print('Receba 2 notas do aluno e calcule a média') | ||
n1=float(input('Informe a 1ª nota:')) | ||
n2=float(input('Informe a 2ª nota:')) | ||
|
||
m= (n1+n2)/2 | ||
print('A média do aluno é {:.1f}'.format(m)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
print('Converter Metros para centímetros e milímetros') | ||
m=float(input('Informe a quantiade de metros:')) | ||
print('A medida em metros de {} equivale a {} centímetros'.format(m,m*100)) | ||
print('A medida em metros de {} equivale a {} milímetros'.format(m,m*1000)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
print('Tabuada') | ||
n1=int(input('Informe um número:')) | ||
print('¨¨¨'*20) | ||
c=1 | ||
print('{} X {:2} = {}'.format(n1,c,n1*c)) | ||
c=c+1 | ||
print('{} X {:2} = {}'.format(n1,c,n1*c)) | ||
c=c+1 | ||
print('{} X {:2} = {}'.format(n1,c,n1*c)) | ||
c=c+1 | ||
print('{} X {:2} = {}'.format(n1,c,n1*c)) | ||
c=c+1 | ||
print('{} X {:2} = {}'.format(n1,c,n1*c)) | ||
c=c+1 | ||
print('{} X {:2} = {}'.format(n1,c,n1*c)) | ||
c=c+1 | ||
print('{} X {:2} = {}'.format(n1,c,n1*c)) | ||
c=c+1 | ||
print('{} X {:2} = {}'.format(n1,c,n1*c)) | ||
c=c+1 | ||
print('{} X {:2} = {}'.format(n1,c,n1*c)) | ||
c=c+1 | ||
print('{} X {:2} = {}'.format(n1,c,n1*c)) | ||
c=1 | ||
print('Pronto, Tabuada do {} na tela'.format(n1)) | ||
print('-'*50) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
print('Quantos Dólares vc pode comprar') | ||
r = float(input('Informe quantos reais você tem na carteira R$:')) | ||
d = 5.73 | ||
print('A cotação do dólar atual é R${}\n'.format(d)) | ||
print('Você pode comprar US${} doláres com esses {} reais que você tem'.format(r//d,r)) | ||
print('Você pode comprar US${:.2f} doláres com esses {} reais que você tem'.format(r/d,r)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
print('PINTANDO MINHA PAREDE') | ||
l = float(input('Informe a largura da parede:')) | ||
h = float(input('Informe a altura da parede:')) | ||
area=l*h | ||
|
||
print('Você vai precisar de {} litros de tinta para pintar essa parede de {} metros quadrados.'.format(area/2,area)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
print('Loja com Descontaço - Black Friday') | ||
|
||
p = float(input('Informe o preço do Produto: ')) | ||
d = float(input('Informe quanto vai dar de desconto em %: ')) | ||
|
||
print('Caro cliente, o preço deste produto é R${} mas eu conversei com o gerente e consegui {}% de desconto. Então o produto vai ficar R${}. Parabéns'.format(p,d,p*((100-d)/100))) | ||
print('Você economizou {}'.format(p*(d/100))) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
print('Aumento de Salário') | ||
p = float(input('Informe o salário do Funcionário: ')) | ||
d = float(input('Informe quanto vai dar de aumento em %: ')) | ||
|
||
print('Parabéns funcionário. Você conseguiu {}% de aumento de salário. Seu salário era R${} agora será de R${}. Você ganhou R${} a mais.'.format(d,p,p*((d+100)/100),p*(d/100))) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
print("Conversor de Temperaturas") | ||
c = float(input("Informe a temperatura em ºC:")) | ||
|
||
f = (c*(9/5))+32 # 9/5 = 1.8 | ||
k = (c + 273.15) | ||
|
||
#print('A temperatura {}ºC é {}ºF Fahrenheit e {}ºK Kelvin'.format(c,f,k)) | ||
|
||
print('A temperatura {0}ºC é {1}ºF Fahrenheit e {2}ºK Kelvin'.format(c,f,k)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
print("Aluguel de Carros") | ||
d = int(input('Quantos dias desejar alugar o carro:')) | ||
km = int(input('Rodar quantos Km o carro:')) | ||
fixo = 60 | ||
diaria= 0.15 | ||
print('o Valor a pagar por {} dias é: R${}'.format(d, d*fixo +(diaria*km))) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import emoji | ||
import math | ||
import random | ||
num = random.randint(1,10) | ||
|
||
print(math.sqrt(num)) | ||
print(num) | ||
|
||
print(emoji.emojize("Aqui é treta :earth_americas:",use_aliases=True)) | ||
|
||
print('*'*20) | ||
print('Programa para exibir o número real') | ||
n = float(input('Digite um número: ')) | ||
aleatorio = n * random.random() | ||
|
||
print('[CEIL] O número {} tem a parte inteira {}'.format(n,math.ceil(n))) | ||
print('[TRUNC] O número {} tem a parte inteira {}'.format(n,math.trunc(n))) | ||
print('[COM FORMATACAO] O número {} tem a parte inteira {:.0f}'.format(n,n)) | ||
print('[COM INT] O número {} tem a parte inteira {}'.format(n,int(n))) | ||
|
||
|
||
print('Olha um aleatório doidão:',aleatorio) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import random | ||
import math | ||
import emoji | ||
|
||
print('Calcular a Hipotenusa') | ||
co = float(input('Digite o valor do Cateto Oposto:')) | ||
ca = float(input('Digite o valor do Cateto Adjacente')) | ||
|
||
hip = math.sqrt(pow(co,2)+pow(ca,2)) | ||
print(emoji.emojize("A hipotenusa deste :triangular_ruler: é {:.2f}",use_aliases=True).format(hip)) | ||
print('-----'*20) | ||
hip = math.hypot(co,ca) | ||
print(emoji.emojize("A hipotenusa deste :triangular_ruler: é {:.2f}",use_aliases=True).format(hip)) | ||
print('-----'*20) | ||
print('\n') | ||
print('####'*20) | ||
|
||
print('Calcular o Seno, Cosseno e Tangente') | ||
ang = float(input('Informe o valor do ângulo: ')) | ||
#s = co / hip | ||
#c = ca / hip | ||
#t = co / ca | ||
ang_r = math.radians(ang) | ||
s = math.sin(ang_r) | ||
c = math.cos(ang_r) | ||
t = math.tan(ang_r) | ||
|
||
print('O ângulo {0:.0f}º, tem {1:.2f} como SENO, {2:.2f} como COSSENO e {3:.2f} como TANGENTE'.format(ang,s,c,t)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import random | ||
print('Sortear nomes aleatórios') | ||
a1 = str(input('Digite o nome do Aluno:')) | ||
a2 = str(input('Digite o nome do Aluno:')) | ||
a3 = str(input('Digite o nome do Aluno:')) | ||
a4 = str(input('Digite o nome do Aluno:')) | ||
sorteado = random.choice([a1,a2,a3,a4]) | ||
|
||
|
||
print('Oi {}, você foi sorteado. Meus Parabéns. Pode ir apagar a lousa e trazer meu café.'.format(sorteado)) | ||
|
||
print('####'*20) | ||
#lista= [a1,a2,a3,a4] | ||
#print('Oi {}, você foi sorteado. Meus Parabéns. Pode ir apagar a lousa e trazer meu café.'.format(sorted(lista))) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import random | ||
print('Sortear Ordem de Apresentação dos Alunos') | ||
a1 = str(input('Digite o nome do Aluno:')) | ||
a2 = str(input('Digite o nome do Aluno:')) | ||
a3 = str(input('Digite o nome do Aluno:')) | ||
a4 = str(input('Digite o nome do Aluno:')) | ||
|
||
sorteado = random.sample([a1,a2,a3,a4],k=4) | ||
|
||
print('[SIMPLE] Oi. Essa é a ordem de apresentação dos alunos: {}.'.format(sorteado)) | ||
#o legal de usar o sample ao invés do shuffle é q da pra limitar a quantidade de pessoas q vão apresentar, atribuindo a quantidade no 'k', | ||
# então se na lista tiverem 10 alunos inscritos | ||
# mas o k for igual a 5 então serão escolhidos só 5 dentre os 10 alunos | ||
# sample([aluno1, aluno2, aluno3, aluno4], k=2) -> serão escolhidos 2 dentre os 4 alunos | ||
print('xxxxx'*20) | ||
sorteado_shuffle = [a1,a2,a3,a4] | ||
random.shuffle(sorteado_shuffle) | ||
print('[SHUFFLE] Oi. Essa é a ordem de apresentação dos alunos: {}.'.format(sorteado_shuffle)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import vlc | ||
import time | ||
import random | ||
import emoji | ||
|
||
musics = ['Giant.mp3','Rize_Up.mp3','Birds_in_Flight.mp3'] | ||
musica = random.choice(musics) | ||
s = vlc.MediaPlayer(("./mp3/{}".format(musica))) | ||
print(emoji.emojize(':speaker: :musical_note: Dança ai Galera, a musica que está tocando é: {}',use_aliases=True).format(musica)) | ||
|
||
s.play() | ||
|
||
time.sleep(20) | ||
s.stop() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
print('~~~'*50) | ||
nome_completo = str(input('Digite o seu nome completo: ')) | ||
print(nome_completo.upper()) | ||
print(nome_completo.lower()) | ||
print(len(nome_completo.strip())) | ||
primeiro_nome = nome_completo.split() | ||
print(primeiro_nome) | ||
print('SEM ESPAÇO {} tem {} letras'.format(nome_completo.replace(' ',''),len(nome_completo.replace(' ','')))) | ||
print('O primeiro nome {} tem {} letras'.format(primeiro_nome[0].upper(), len(primeiro_nome[0]))) | ||
print('~~~'*50) | ||
#frase = str(input('Digite uma frase: ')) | ||
frase ='Eu sou Corinthiano Mano. Aqui tem um bando de louco' | ||
print(frase[4]) | ||
print(frase[4:11]) | ||
print(frase[4:11:2]) | ||
print(frase[:5]) | ||
print(frase[5:]) | ||
print(len(frase)) #comprimento | ||
print(frase.count('o'))#contar quantas vezes tem a letra na analise | ||
print(frase.find('ano'))#procurar a palavra | ||
print('Corinthiano' in frase) | ||
|
||
print(frase.replace('Corinthiano','Palmeiras')) | ||
print(frase.upper()) | ||
print(frase.lower()) | ||
print(frase.capitalize())#primeiro caracatere em maiusculo | ||
print(frase.title())#todas as palavras inciias em maiusculo | ||
print(frase.strip())#remove espalis em brancos inuteis da direita e esquerda | ||
print(frase.rstrip())#remove espalis em brancos inuteis da direita | ||
print(frase.lstrip())#remove espalis em brancos inuteis da esquerda | ||
#divisão | ||
print(frase.split())#aproveita o espaço em branco | ||
print('X'.join(frase)) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import random | ||
#https://wiki.python.org.br/ManipulandoStringsComPython | ||
num = int(random.randint(0,9999)) | ||
n = str(num) | ||
|
||
u = num//1 %10 | ||
d = num//10 %10 | ||
c = num//100 %10 | ||
m = num//1000 %10 | ||
|
||
print('----'*20) | ||
print('Analisando o número: {}'.format(num)) | ||
print('Unidade : {}'.format(u)) | ||
print('Dezena : {}'.format(d)) | ||
print('Centena : {}'.format(c)) | ||
print('Milhar : {}'.format(m)) | ||
|
||
print('----'*20) | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
print('SUA CIDADE NATAL') | ||
|
||
cidade = str(input('Que cidade você nasceu? ')).upper().strip() | ||
|
||
print('SANTO' in cidade) |
Oops, something went wrong.