ЛИЧНЫЙ КАБИНЕТ
ЛАГЕРЬ ЮНЫХ ПРОГРАММИСТОВ
НЕДЕЛЯ PYTHON
PYTHON
12-14 лет

11:00-11:40 - Профессии будущего

13:00-13:40
- Программирование Python
14:00-14:40 - Программирование Python

19:00-19:30
- ВИКТОРИНА

1
id для ZOOM: 932 4633 4597
пароль: 111
также можно просто нажать на кнопку "ПОДКЛЮЧЕНИЕ ZOOM"

2
СКАЧИВАЕМ PYTHON


3
PYTHON
ДЕНЬ 1
Функция
def print_seconds_day (days):
    hours= days*24
    minutes=hours*60
    seconds = minutes*60
    print (seconds)
 
print_seconds_day(4)
Функция
def convert_days_to_seconds (days):
    hours=days*24
    minutes=hours*60
    seconds = minutes*60
    print (seconds)
    return seconds

totalsec = convert_days_to_seconds (5)
millisec  = totalsec*1000
print (millisec)
ДЕНЬ 2
import random
import string

adjectives = ['sleepy', 'slow', 'hot',
              'cold', 'big', 'red',
              'orandge', 'yellow', 'green',
              'blue', 'good', 'old',
              'white', 'free', 'brave']
nouns = ['apple', 'dinosaur', 'ball', 'cat', 'goat', 'dragon', 'car', 'duck', 'panda']
print ('Добро пожаловать!')

adjective = random.choice (adjectives)
noun = random.choice (nouns)
number = random.randrange(0,100)
special_char = random.choice (string.punctuation)
password = adjective + noun + str(number) + special_char
print ('Новый пароль: %s ' % password)
ДЕНЬ 3
import random
import string

adjectives = ['sleepy', 'slow', 'hot', 'cold', 'big',
              'red', 'orandge', 'yellow', 'green',
              'blue', 'good', 'old',
              'white', 'free', 'brave']
nouns = ['apple', 'dinosaur', 'ball', 'cat', 'goat', 'dragon', 'car', 'duck', 'panda']


print ('Добро пожаловать!')
while True:
    adjective = random.choice (adjectives)
    noun = random.choice (nouns)
    number = random.randrange(0,100)
    special_char = random.choice (string.punctuation)
    password = adjective + noun + str(number) + special_char
    print ('Новый пароль: %s ' % password)

    response=input ('Сгенерировать другой пароль? д/н  ')
    if response == 'н':
       break
ДЕНЬ 4
dinner = input ('Что ты хочешь на ужин? пицца/паста/пирожки  ')
if dinner == 'пицца':
        print ('Хорошо, она будет с пеперони)))')
elif dinner == 'паста':
        print ('Отличный выбор! Я приготовлю карбонару ')
else:
        print ('Ммммммм замечательно!')
ДЕНЬ 5
подготовка
import random
lives = 9
words = ['мираж', 'пицца', 'ангел', 'носки', 'выдра', 'петух']
secret_word  = random.choice(words)
clue = list ('?????')
heart_symbol = u'\u2764'
guessed_word_correctly = False

def update_clue (guessed_letter, secret_word, clue):
    index = 0
    while index < len(secret_word):
        if guessed_letter == secret_word[index]:
            clue[index] = guessed_letter
        index = index + 1
основной код
while lives>0:
    print (clue)
    print ('Осталосб жизней: ' + heart_symbol * lives)
    guess = input ('Угадайте букву или слово: ')

    if guess == secret_word:
        guessed_word_correctly = True
        break
    if guess in secret_word:
        update_clue (guess, secret_word, clue)
    else:
        print ('Неправильно((( Вы потеряли жизнь...')
        lives = lives-1
ИП Муниев А.М.
ИНН: 081407563384
ОГРНИП: 319081600009565
+79164556267
info@engineerika.moscow
Made on
Tilda