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 rgb(r, g, b): | |
dictionary = {0: 0, | |
1: 1, | |
2: 2, | |
3: 3, | |
4: 4, | |
5: 5, | |
6: 6, | |
7: 7, | |
8: 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
def song_decoder(song): | |
return ' '.join(song.replace('WUB', ' ').split()) |
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 datetime as dt | |
FORMAT = '%H:%M:%S' | |
WEIGHT = 75 # Вес. | |
HEIGHT = 175 # Рост. | |
K_1 = 0.035 # Коэффициент для подсчета калорий. | |
K_2 = 0.029 # Коэффициент для подсчета калорий. | |
STEP_M = 0.65 # Длина шага в метрах. | |
storage_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
def is_pangram(s): | |
let = [] | |
[let.append(l.lower()) for l in s if l.isalpha()] | |
return True if len(set(let)) == 26 else False |
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 divisors(integer): | |
divs = [] | |
if integer > 1: | |
[divs.append(i) for i in range(2, integer) if integer % i == 0] | |
if not divs: | |
return f'{integer} is prime' | |
else: | |
return divs |