blob_id string | repo_name string | path string | length_bytes int64 | score float64 | int_score int64 | text string |
|---|---|---|---|---|---|---|
68f001eb41544fb4909d6865b10179e8f3bc5fd1 | ColeAnderson7278/Rental_Agency_ColeAnderson | /shell.py | 6,614 | 4.09375 | 4 | import disk
import core
def print_inventory(inventory):
print(
'---------------------------------------------------------------------------'
)
for key in inventory:
print(
f"\n{key}) Name: {inventory[key]['name']} Rent Price Per Day: {inventory[key]['rent price']} Replacement P... |
ac574bcbb7ad181fbb1baa355941128fcc582e67 | frederico-prog/python | /pythonbasico/aula3-operadores-logicos.py | 1,471 | 4.15625 | 4 | '''
Comparações: == != > < >= <=
Comparções: and or
'''
# var_verdade = True
# var_falso = False
# #
# # print(var_falso, var_veradeiro)
#
# if var_verdade == True:
# print('Var_verdade é verdadeiro!')
#
# a = 2
# b = 20
#
# if a > b:
# print(a, 'é maior do que', b)
# else:
# print(a, 'não é maior do que',... |
a1e30ee0aef59f4771bcdcb37957a263f2147178 | frederico-prog/python | /exerciciospython/EstruturaDeRepeticao/atividade38.py | 1,073 | 3.90625 | 4 | '''
38 - Um funcionário de uma empresa recebe aumento salarial anualmente: Sabe-se que:
a - Esse funcionário foi contratado em 1995, com salário inicial de R$ 1.000,00;
b - Em 1996 recebeu aumento de 1,5% sobre seu salário inicial;
c - A partir de 1997 (inclusive), os aumentos salariais sempre correspondem ... |
de8e05068ef265ceb812eb5c4f9b9a6c62b3601c | frederico-prog/python | /cursoemvideo/aula015a.py | 512 | 3.78125 | 4 | '''
LAÇOS DE REPETIÇÃO (PARTE 3) - WHILE(break)
'''
'''
cont = 1
while cont <= 10:
print(cont, '-> ', end='')
cont += 1
print('ACABOU!')
'''
'''
n = count = s = 0
while n != 999:
n = int(input('Digite um nº: '))
s += n
count += 1
print('Soma {} \nQtde: {}'.format(s, count))
'''
n = count = s = 0
w... |
0dafbfde85372e9fab0c32fdf495e00f34e2a41c | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex026.py | 848 | 4.21875 | 4 | '''
Crie um programa que leia uma frase pelo teclado e mostre:
Quantas vezes aparece a letra "A"
Em que posição ela aparece a primeira vez
Em que posição ela aparece a última vez.
'''
frase = str(input('Digite a sua frase: ')).strip()
contagem = frase.upper().count('A')
print('Analisando a frase "{}"...'.format(frase.u... |
4c256da73cb4f1b8d789b78cd7b6415669e7dc74 | frederico-prog/python | /pythonbasico/aula5-estrutras-de-laco.py | 1,319 | 3.9375 | 4 | # nomes = ['Guilherme', 'Marcelo', 'Frederico', 'Marta', 'Maria']
# for i in range(len(nomes)):
# nome = str(input('Insira um nome: ')).upper().strip()
# nomes.append(nome)
# print(nomes)
# i = 0
# while i <= 10:
# print('i ainda é menor do que 10.', i)
# i += 1
# lista_frutas = ['maçã', 'goiaba', '... |
3c1d5e6c84a9f3b75daafcc28f04d5bae518db6d | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex046.py | 529 | 3.625 | 4 | '''
Faça um programa que mostre na tela a contagem regressiva para o estouro de fogos de artifícios, indo de 10 até 0, com
pausa de 1 segundo entre eles.
'''
from time import sleep
import emoji
print('-=-' * 15)
print('{:^40}'.format(' CONTAGEM REGRESSIVA '))
print('-=-' * 15)
num = 10
print('Inciando a contagem!!!... |
f13ceeda1ec79d1d246f745e25340a112e72e1dc | frederico-prog/python | /exerciciospython/Lista/Atividade6.py | 990 | 3.65625 | 4 | '''
6 - Faça um Programa que peça as quatro notas de 10 alunos, calcule e armazene num vetor a média de cada aluno,
imprima o número de alunos com média maior ou igual a 7.0.
'''
lista_nota = []
media_aluno = 0
# inseri as notas dos alunos
for a in range(0, 10):
lista_nota_aluno = []
for n in range(0, 4):
... |
d3dbe76ee3f24faa339ae0ad0c32723fd0f0211e | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex069.py | 1,140 | 4.1875 | 4 | '''
CRIE UM PROGRAMA QUE LEIA A IDADE E O SEXO DE VÁRIAS PESSOAS. A CADA PESSOA CADASTRADA, O PROGRAMA DEVERÁ PERGUNTAR
SE O USUÁRIO QUER OU NÃO CONTINUAR. NO FINAL, MOSTRE:
A- QUANTAS PESSOAS TEM MAIS DE 18 ANOS.
B- QUANTOS HOMENS FORAM CADASTRADOS.
C- QUANTAS MULHEREES TEM MENOS DE 20 ANOS.
'''
import emoji
print('-=... |
ee13bb0209486182312eb4835c886a7dc8914a08 | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex053.py | 767 | 4.34375 | 4 | '''
Crie um programa que leia uma frase qualquer e diga se ela é um palíndromo, desconsiderando os espaços.
Ex.: APÓS A SOPA / A SACADA DA CASA / A TORRE DA DERROTA / O LOBO AMA O BOLO / ANOTARAM A DATA DA MARATONA
'''
print('-=-' * 12)
print('{:^35}'.format(' PALÍNDROMO '))
print('-=-' * 12)
frase = str(input('Digite... |
1aada5a04100f79dd870de9b0c55e74ba0f77916 | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex047.py | 433 | 3.875 | 4 | '''
Crie um programa que mostre na tela todos os números pares que estão no intervalo entre 1 e 50
'''
import emoji
print('-=-' * 15)
print('{:^40}'.format(' NÚMEROS PARES '))
print('-=-' * 15)
'''for count in range(1, 51):
if count % 2 == 0:
print(count, end=' ')'''
for count in range(2, 51, 2):
print... |
53882f6da64ee7388e2c986b3aeb8324e5d761fb | frederico-prog/python | /cursoemvideo/aula23a.py | 702 | 4.0625 | 4 | '''
TRATAMENTOS DE ERRO E EXCEÇÕES
- ERRO DE SINTAXE
- ERRO DE SEMÂNTICA
'''
# n = int(input('Número: '))
# print(f'Você digitou o número {n}')
try:
a = int(input('Numerador: '))
b = int(input('Denominador: '))
r = a / b
except (ValueError, TypeError):
print('Tivemos um problema cos os tipos de dados... |
50bd37bb0a30fdcd6c1ef209830069bd7560b9bc | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex072.py | 1,127 | 4.09375 | 4 | '''
CRIE UM PROGRAMA QUE TENHA UMA TUPLA TOTALMENTE PREENCHIDA COM UMA CONTAGEM POR EXTENSO, DE ZERO ATÉ VINTE.
SEU PROGRAMA DEVERÁ RECEBER UM NÚMERO PELO TECLADO (ENTRE 0 E 20) E MOSTRÁ-LO POR EXTENSO
'''
import emoji
print('-=-' * 20)
print('{:^60}'.format(' CONTADOR NUMÉRICO '))
print('-=-' * 20)
numeracao = ('ZERO... |
774087a68b3f1a92d544a30e1b830b35b29db108 | frederico-prog/python | /exerciciospython/EstruturaSequencial/atividade17.py | 1,834 | 4.25 | 4 | '''
17 - Faça um Programa para uma loja de tintas. O programa deverá pedir o tamanho em metros quadrados da área a ser
pintada. Considere que a cobertura da tinta é de 1 litro para cada 6 metros quadrados e que a tinta é vendida em latas
de 18 litros, que custam R$ 80,00 ou em galões de 3,6 litros, que custam R$ 25,00.... |
7b5461a0297b629a535a338faf6125e1d6dd4672 | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex019.py | 478 | 4.0625 | 4 | # Um professor quer sortear uns dos seus quatro alunos para apagar o quadro. Faça um programa que ajude ele, lendo o nome
# deles e escrevendo o nome do escolhido.
from random import choice
print('******** DESAFIO - AULA 08 - SORTEAR ALUNO *********')
n1 = input('Primeiro aluno: ')
n2 = input('Segundo aluno: ')
n3 = in... |
1e204fbca669f3112ad553b91490b1d8d6e1d022 | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex099.py | 988 | 4 | 4 | '''
FAÇA UM PROGRAMA QUE TENHA UMA FUNÇÃO CHAMADA MAIOR(), QUE RECEBA VÁRIOS PARÂMETROS COM VALORES INTEIROS.
SEU PROGRAMA TEM QUE ANALISAR TODOS OS VALORES E DIZER QUAL DELES É O MAIOR.
'''
from time import sleep
from random import randint
def quebralin():
print('-=' * 20)
def numaleatorio():
tamanho = rand... |
09a0733aa76c0e73769c3c0692236634f48a75ef | frederico-prog/python | /Scrips-Python/adivinhacao1.py | 2,569 | 3.703125 | 4 | numero_secreto = 42
total_de_pontos = 1000
nivel = int(input('Selecione o nível para o jogo: \n1- 20 Tentativas \n2- 10 Tentativas \n3- 5 Tentativas \n'))
if nivel == 1:
total_tentativa = 20
for rodada in range(0, total_tentativa):
print(f'Tentativa {rodada+1} de {total_tentativa}.')
chute = ... |
2f6385177bbcff16e050615237a6f543f3c283b3 | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex070.py | 1,384 | 4.09375 | 4 | '''
CRIE UM PROGRAMA QUE LEIA O NOME E O PREÇO DE VÁRIOS PRODUTOS. O PROGRAMA DEVERÁ PERGUNTAR SE O USUÁRIO VAI CONTINUAR. NO
FINAL, MOSTRE:
A- QUAL É O TOTAL GASTO NA COMPRA
B- QUANTOS PRODUTOS CUSTAM MAIS DE R$1000.
C- QUAL É O NOME DO PRODUTO MAIS BARATO.
'''
print('-=-' * 17)
print('{:^50}'.format(' LOJA DE PYTHON ... |
6603e65b445762a364ffaae1df965ceca149832a | frederico-prog/python | /exerciciospython/EstruturaSequencial/atividade11.py | 781 | 4.28125 | 4 | import math
'''
11 - Faça um Programa que peça 2 números inteiros e um número real. Calcule e mostre:
a - o produto do dobro do primeiro com metade do segundo .
b - a soma do triplo do primeiro com o terceiro.
c - o terceiro elevado ao cubo.
'''
print('Informe 2 números inteiros e um número real:')
num1 = ... |
aa5321de221405b0cde8d86d8361ff627533c25d | frederico-prog/python | /exerciciospython/EstruturaDeDecisao/atividade1.py | 418 | 3.84375 | 4 | '''
1 - Faça um Programa que peça dois números e imprima o maior deles.
'''
valor1 = str(input('Insira o primeiro valor: ')).replace(',', '.')
valor2 = str(input('Insira o segundo valor: ')).replace(',', '.')
num1 = float(valor1)
num2 = float(valor2)
if num1 > num2:
print(f'O número {num1:.2f} é maior que o númer... |
a42a20f8032428291ac0a9d99ccf1711af26ad4a | frederico-prog/python | /exerciciospython/EstruturaDeDecisao/atividade2.py | 303 | 3.828125 | 4 | '''
2 - Faça um Programa que peça um valor e mostre na tela se o valor é positivo ou negativo.
'''
valor = str(input('Informe o número desejado: ')).replace(',', '.')
num = float(valor)
if num > 0:
print(f'O número {num:.2f} é positivo.')
else:
print(f'O número {num:.2f} é negativo.')
|
50b860d54fd5e3f6a2c48fbdbd4af89b2dc209a1 | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex102.py | 1,164 | 4.3125 | 4 | '''
CRIE UM PROGRAMA QUE TENHA UMA FUNÇÃO FATORIAL() QUE RECEBA DOIS PARÂMETROS: O PRIMEIRO QUE INDIQUE O NÚMERO A CALCULAR
E O OUTRO CHAMADO SHOW, QUE SERÁ UM VALOR LÓGICO(OPCIONAL) INDICANDO SE SERÁ MOSTRADO OU NÃO NA TELA O PROCESSO DE CÁLCULO
DO FATORIAL
'''
def fatorial(num, show=False):
"""
-> Calcula o... |
771ddc36acec698f9d6d3baaa0f7d5c20573932e | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex014.py | 221 | 4.28125 | 4 | # Crie um algoritmo que converta a temperatura de celsius para fahrenheit
c = float(input('Informe a temperatura em °C: '))
f = ((9 * c) + 5) + 32
print('A temperatura de {:.2f}°C corresponde a {:.2f}°F'.format(c, f))
|
7e7f127550dc16b22e6a7e1ac69968e9a724e4a7 | frederico-prog/python | /exerciciospython/EstruturaDeRepeticao/atividade39.py | 891 | 4.3125 | 4 | '''
39 - Faça um programa que leia dez conjuntos de dois valores, o primeiro representando o número do aluno e o segundo
representando a sua altura em centímetros. Encontre o aluno mais alto e o mais baixo. Mostre o número do aluno mais alto
e o número do aluno mais baixo, junto com suas alturas.
'''
codigoMaisAlto = c... |
911ac494bb564f5a7a54d7e16e9f3a9bc0e62500 | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex114.py | 403 | 3.625 | 4 | '''
CRIE UM CÓDIGO EM PYTHON QUE TESTE SE O SITE PUDIM ESTÁ ACESSÍVEL PELO COMPUTADOR USADO.
'''
import urllib
import urllib.request
try:
site = urllib.request.urlopen('http://www.pudim.com.br')
except urllib.error.URLError:
print('\033[0:31mO Site não está disponível.\033[m')
else:
print('O site está disp... |
a7ecb8b45a3a1abb388f2c221199623d6d235b29 | frederico-prog/python | /exerciciospython/Lista/Atividade3.py | 351 | 3.671875 | 4 | '''
4 - Faça um Programa que leia 4 notas, mostre as notas e a média na tela.
'''
lista_nota = []
media = 0
for nota in range(1, 5):
nota_str = str(input(f'Informe a {nota}: ')).replace(',', '.')
nota = float(nota_str)
lista_nota.append(nota)
media = sum(lista_nota) / len(lista_nota)
print(f'A média das not... |
516abb8f62fcb182a7a8849d0f78bec712f48135 | frederico-prog/python | /cursoemvideo/Atividades/exercicios/ex004.py | 622 | 4.15625 | 4 | # Faça um programa que leia algo pelo teclado e mostre na tela o seu tipo primitivo
# e todas as informações possíveis sobre ele.
print('******** DESAFIO - AULA 06B *********')
variavel = input('Digite alguma coisa: ')
print('O tipo primitivo desse valor é: ', type(variavel))
print('Só tem espaço? ', variavel.isspace()... |
3ea1809ea6de0499063f473187918de0f90cbdd5 | frederico-prog/python | /exerciciospython/EstruturaSequencial/atividade15.py | 1,096 | 3.828125 | 4 | '''
15 - Faça um Programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. Calcule e mostre o
total do seu salário no referido mês, sabendo-se que são descontados 11% para o Imposto de Renda, 8% para o INSS e 5%
para o sindicato, faça um programa que nos dê:
a - salário bruto.
b -... |
f22fd6d7248f4af08786f4f20453f239b33e52b6 | frederico-prog/python | /exerciciospython/EstruturaSequencial/atividade8.py | 431 | 3.8125 | 4 | '''
8 - Faça um Programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês.
Calcule e mostre o total do seu salário no referido mês.
'''
valor = str(input('Informe o seu salário por hora: ')).replace(',', '.')
horas = int(input('Informe o número de horas trabalhadas por mês: '))
salario = f... |
dd6895bdf5f4390392ae44c6b91e355b7b8e7e6d | veyzz/assaia_test | /board.py | 1,005 | 3.796875 | 4 | class Board:
def __init__(self, size):
self.max_height = size[1]
self.matrix = [[] for _ in range(size[0])]
self.filled = 0
def push(self, n, el):
'''Returns y coordinate of added element
or None if not succesfull
'''
if n not in range(len(self.matrix)):... |
3e85b5938ca5c03b3f9599c8648243eb6e39f1c7 | ver0810/shiyanlou-code | /jump7.py | 89 | 3.53125 | 4 | for i in range(1, 101):
if i//10==7 or i%7==0 or i%10==7:
continue
else:
print(i)
|
8032e2cab86fc8952fce24c6ac1769ac1d398ed1 | Jeep123Samuels/Codility_Lessons | /lesson_3/frog_jumps.py | 1,514 | 4.25 | 4 | """Main script for frog_jumps.py"""
# A small frog wants to get to the other side of the road.
# The frog is currently located at position X and
# wants to get to a position greater than or equal to Y.
# The small frog always jumps a fixed distance, D.
#
# Count the minimal number of jumps that the small frog must per... |
fe12b57a5eed9d8e168981f63ee2001ff5212f96 | Jeep123Samuels/Codility_Lessons | /lesson_1/binary_gaps.py | 862 | 4.0625 | 4 | """Main script for binary_gaps.py"""
# For example, given N = 1041 the function should return 5,
# because N has binary representation 10000010001 and so its longest binary gap is of length 5.
#
# Assume that:
#
# N is an integer within the range [1..2,147,483,647].
# Complexity:
#
# expected worst-case time complexi... |
2ec8c17b6003a32b7ec0b1b770ef8d686b942039 | Ljupch0/python-data-structure-exercises | /rgb_colours.py | 747 | 4.03125 | 4 | # This program knows about the RGB code corresponding to common colours.
#
# Usage:
#
# $ python rgb_colours.py [colour]
#
# For instance:
#
# $ python rgb_colours.py red
# The RGB code for red is F00
#
# or:
#
# $ python rgb_colours.py "burnt sienna"
# I don't know the RGB code for burnt sienna
colours = [
['red'... |
c3eedc0b975675ac8a8ac47675e2f5dc5e4ce250 | yanolab/project-euler | /p005.py | 791 | 3.78125 | 4 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import p003
import operator
def primes(max):
"""2-maxまでの間の素数を返すジェネレータ"""
return (x for x in xrange(2, max+1) if p003.isprime(x))
def commonprimes(lst=[]):
"""lstに共通の素因数を返すジェネレータ"""
primenumbers = list(primes(max(lst)))
while(len(lst) >... |
4f9da4dcdcbc401e4a74a82e79087dedfd22ad09 | Epineda312/pythonFiles | /UD-Py/Day_3/bmiCalc.py | 285 | 4.28125 | 4 | #Request user input
height = input("enter your height in m: ")
weight = input("enter your weight in kg: ")
#Use input to calculate users BMI
BMI = int(weight) / float(height) ** 2
#convert BMI to int (rounds )
bmi_as_int = int(BMI)
#Print result
print (bmi_as_int)
|
6d77c3db8dad4a18243f15b1aa689d9a74d2b23e | Epineda312/pythonFiles | /UD-Py/day_9/student_grades.py | 1,256 | 4.1875 | 4 | student_scores = {
"Harry": 81,
"Ron": 78,
"Hermione": 99,
"Draco": 74,
"Neville": 62,
}
# Create an empty dictionary called student_grades.
student_grades = {}
# Write code below to add the grades to student_grades.
for value in student_scores:
val = student_scores[value]
# if val >= 91 a... |
05da9f20989af73cac0d6e3de32f39dd6a018763 | Jeme-Yufeng-Zhan/prisoners-dilemma-nn | /starter/SubModel.py | 775 | 3.5625 | 4 | class SubModel(object):
"""Abstracts a sub-model, like encoders, for example
"""
def __init__(self, config):
self.config = config
def add_prediction_op(self, inputs, output_size=None):
"""Implements the core of the model that transforms a batch of input data into predictions.
A... |
d161d86806de39fb684067cee4f7331f78105062 | figueiredo-alef/estudo-python | /exemplos/ex018.py | 414 | 3.90625 | 4 | from math import radians, sin, cos, tan
print('=' * 5, 'EX_018', '=' * 5)
# seno, cosseno, tangente
ang = float(input('Digite o angulo desejado: '))
seno = sin(radians(ang))
print('O angulo de {} tem SENO de {:.2f}'.format(ang, seno))
coss = cos(radians(ang))
print('O angulo de {} tem COSSENO de {:.2f}'.format(ang, cos... |
f670295aa3f5897c0b0fbaa03f4f179b554f01e7 | figueiredo-alef/estudo-python | /aulas/aula010b.py | 341 | 3.828125 | 4 | print('=' * 5, 'AULA_010b', '=' * 5)
p1 = float(input('Qual a nota da P1? '))
p2 = float(input('Qual a nota da P2? '))
p3 = float(input('Qual a nota da P3? '))
m = (p1 + p2 + p3) / 3
print('A sua média foi: {:.2f}'.format(m))
if m >= 7.0:
print('Parabéns, você foi aprovado!')
else:
print('Média insuficiente par... |
8dd009833031b7ee3b401048046ced1fe48651d5 | figueiredo-alef/estudo-python | /exemplos/ex034.py | 329 | 3.8125 | 4 | print('=' * 5, 'EX_034', '=' * 5)
# aumentos múltiplos
salario = float(input('Qual é o salário do funcionário? R$'))
if salario > 1250:
aumento = salario + (salario * 10 / 100)
else:
aumento = salario + (salario * 15 / 100)
print('O funcionário recebia R${:.2f} e passa a receber R${:.2f}'.format(salario, aument... |
89070851368a09e7076e25d25ac55a5330c7568b | figueiredo-alef/estudo-python | /01_teste.py | 320 | 3.828125 | 4 | # fazer testes a qualquer momento
print('=' * 5, 'TESTE-01', '=' * 5)
nome = input('Qual o seu nome? ')
idade = input('Qual sua idade? ')
peso = input('Qual seu peso? ')
print('Olá {}! Você está aprendendo a programar aos {} anos e tem {}kg.'.format(nome, idade, peso))
print('Vamos ver o quanto vai engordar. kkk')
|
59d00c79edb0af30fb9c09f1929c247a6add400b | figueiredo-alef/estudo-python | /exemplos/ex002.py | 105 | 3.671875 | 4 | print('=' * 5, 'EX_003', '=' * 5)
nome = input('Digite seu nome: ')
print('Bem vindo, {}!'.format(nome))
|
9067df34b7999f87582c740f1db94f6c8ce82bbc | figueiredo-alef/estudo-python | /aulas/aula007a.py | 424 | 3.953125 | 4 | print('=' * 5, 'AULA_007a', '=' * 5)
print('Operadores aritméticos')
print('Adição +, subtração -, multiplicação *, divisão /, \nexponenciação **, divisão inteira //, resto da divisão %')
print('Ordem de precedência:\n1- ()\n2- **\n3- * / // %\n4- + -')
nome = str(input('Qual é o seu nome?'))
print('Prazer em te conhec... |
6428411da74d266664af831b3d8b004faef1d00e | dreadnaught-ETES/school | /swain_edward_numbergame.py | 1,786 | 4 | 4 | import random
num=random.randint(1,100)
lives=5
gameOver=False
while lives == 0:
gameOver=True
while not gameOver:
guess=int(input("Guess my number (1 to 100): "))
if guess==num:
print("You got it dude.")
print("YOU WIN!")
gameOver=True
break
while guess != n... |
90765a41999fc861238921f9001b60ec85d3ae5c | dreadnaught-ETES/school | /P6setdemofailure.py | 1,613 | 3.890625 | 4 | inventory = {'wallet','cat','TV','matches','knife'}
#this is the set version of the demonsration so i will be using the set for both parts of the completed product.
questions = {'Q1','Q2','Q3','Q4','Q5'}
Q1 = "What is easiest to hold when empty but most desired when full?"
Q2 = "What can commit a crime and also be ... |
2a8d08b5573738cf06bebbe3ddffd235047ffcc2 | dreadnaught-ETES/school | /project 4_theLairEscape.py | 20,393 | 4 | 4 | import random
number=random.randint(1, 10)
gO=False
C=5
print("Welcome to The Lair")
print("a text-based horror escape game where your only goal is to survive and escape")
print("***")
print("You fell asleep in your bed and woke up to find yourself in a stone cavern. You can hear a low, scratchy growl behind you... |
7fb0a8763d6b18314a336e3a6a13e0fdc4fdfc9a | treasuregem/olympic-hero | /code.py | 3,464 | 3.59375 | 4 | # --------------
#Importing header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#Path of the file
data=pd.read_csv(path)
#Code starts here
data.rename(columns={'Total':'Total_Medals'},inplace=True)
print(data.head(10))
# --------------
#Code starts here
data['Better_Event'... |
4fd7fecc1271e4ffe24143ccfb461fc7aa00bcd4 | massenergize/api | /src/task_queue/helpers.py | 1,196 | 3.5625 | 4 | import datetime
from dateutil.relativedelta import relativedelta
WEEKLY = "EVERY_WEEK"
BI_WEEKLY = "bi-weekly"
MONTHLY = "EVERY_MONTH"
YEARLY = "EVERY_YEAR"
DAILY = "EVERY_DAY"
ONE_OFF = 'ONE_OFF'
# it is time to run if the previous time is at least the time period before the current date
def is_time_to_run(task):
... |
b0788570b71bf232826a22f4acbf63292710bdc0 | parrott-kevin/project-euler | /python/problem_05.py | 1,161 | 3.75 | 4 | # Problem 5
# What is the smallest positive number that is evenly divisible by all
# of the numbers from 1 to 20?
PRIME = [2, 3, 5, 7, 11, 13, 17, 19]
def factor_prime(n):
""" Finds the prime factor of n. """
factors = []
if n not in PRIME and n != 1:
i = 0
while n != 1:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.