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
# Находим сколько дней в году, проверяя на високосность | |
if year % 4 == 0 and year % 100 != 0 or year % 400 == 0: | |
feb = 29 | |
else: | |
feb = 28 |
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 * | |
n = int(input('Введите число: ')) # Присвоение переменной n вводимого в консоль значения | |
factor = 2 # Инициализация factor с присвоением 2-ух | |
factors = [] | |
# Проверка на правильность вводимого числа | |
if n < 2: | |
print('Ошибка. Число меньше двух') | |
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
from math import * | |
n = int(input('Введите число: ')) | |
factor = 2 | |
if n < 2: | |
print('Ошибка. Число меньше двух') | |
else: | |
print(f'Простые множители числа {n}:') | |
while factor <= n: |
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
def caesar_code(text, shift): | |
# Обьявление переменных для проверки введенного символа на возможность шифровки. | |
# Также переменная, содержащая длину алфавита, включая наличие 0-го индекса, счетчик ошибок и обьявление new_text. | |
letters_lowercase = 'abcdefghijklmnopqrstuvwxyz' | |
letters_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
symbols = ' -=_+.,~!:@#$%^&*()[]{}\'\"<>:;' | |
numbers = '0123456789' | |
length = len(letters_lowercase) | |
error_count = 0 |
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
print('не абзиваемся') | |
# скажи своему дружку что если он еще раз....... | |
# че ты лыбишься? че узнал? я ща куртку сниму. |
NewerOlder