Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5f981e8
закодировали число
Sep 18, 2023
50fbb06
простой вариант кодировки и раскодировки
Sep 18, 2023
4480e47
выполнили программу для кодировки переменной "a"
Sep 19, 2023
f0e5b4f
выполнили программу для раскодировки переменной "a"
Sep 19, 2023
6546301
выполнили программу для раскодировки переменной "a" Ошибку исправил.
Sep 19, 2023
0396ac4
сохранил изменения
Sep 22, 2023
d1ae1d2
сохранил изменения
Sep 23, 2023
f8ebcf6
сохранил изменения
Sep 24, 2023
1de2767
сохранил изменения
Sep 26, 2023
0140866
сохранил изменения
Sep 26, 2023
d57c550
сохранил изменения
Sep 26, 2023
6f0e784
сохранил изменения
Sep 26, 2023
99caee8
сохранил изменения
Sep 26, 2023
7d33bc6
как перевернуть и сравнить слово
Oct 3, 2023
dc7165d
как перевернуть и сравнить слово
Oct 4, 2023
583750e
Merge branch 'main' of https://github.com/IlyaOrlov/PythonCourse2.0_S…
Oct 4, 2023
33c8022
сохранил
Oct 4, 2023
1c9dd65
исправил, сохранил.
Oct 5, 2023
3d136fd
исправил, сохранил.
Oct 5, 2023
2106725
должно быть правильно.
Oct 6, 2023
3a087af
исправлено
Oct 6, 2023
bb9e858
исправлено
Oct 6, 2023
05ea523
исправление
Oct 6, 2023
cd4a11f
исправление
Oct 6, 2023
13450fc
поменял местами условия
Oct 6, 2023
dc9ca19
исправлено с "i" на i
Oct 6, 2023
e52db46
сохранить на всякий
Oct 6, 2023
34043d1
сохранить
Oct 7, 2023
05802e2
замена
Oct 7, 2023
8d63735
просто замена
Oct 7, 2023
c82da1c
переделал
Oct 7, 2023
068f732
задача
Oct 7, 2023
3d2ca06
задача
Oct 12, 2023
76e399e
Merge branch 'main' of https://github.com/IlyaOrlov/PythonCourse2.0_S…
Oct 14, 2023
e544a07
хочу сохранить что сделано
Oct 14, 2023
ec59753
просто копия версии модуля 4_4
Oct 15, 2023
23b9001
просто копия версии модуля 4_4
Oct 18, 2023
197f4b8
так
Oct 18, 2023
04da033
пробная версия
Oct 18, 2023
2de763f
Merge branch 'main' of https://github.com/IlyaOrlov/PythonCourse2.0_S…
Oct 19, 2023
b2d63b1
тренировка
Oct 20, 2023
572ec64
исправлено.
Oct 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Practice/amarkov/exzample.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name = input("Введите имя рыцаря: ")
name_zdorov = input("Кол-во здоровья: ")
name_yron = input("урон от его меча: ")
name_zapas = input("Кол-во зелий здоровья: ")
print("Герой по имени", name, "отправляется в сказочное приключение. На его пути встречается мерзкий, злой Гоблин")
name_goblin = input("Имя Гоблина:")
gobli_zdorov = input("Здоровье Гоблина: ")
goblin_yron = input("Урон здоровья рыцарю: ")
goblin_zapas = input("запас здоровья Гоблина: ")
print("Отважный рыцарь встречает Гоблина на своём пути. У него", name_goblin, "Здоровья", gobli_zdorov, "а урон от его меча", goblin_yron,)
5 changes: 5 additions & 0 deletions Practice/amarkov/modul3_3/moduk3_3(1).py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
a = input("введите первое число: ")
b = input("введите второе число: ")
print("Result",int(a) + int(b))


3 changes: 3 additions & 0 deletions Practice/amarkov/modul3_3/modul3_3(2).py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a = input("введите первое число: ")
b = input("введите второе число: ")
decod = print("Result",int(a) - int(b))
12 changes: 12 additions & 0 deletions Practice/amarkov/modul3_4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
word = "арзамас"
print(len(word)) # узнал сколько в слове символов

for el in range(len(word)): # перебрал слово в цикле
print(el,[0,7])
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что такое [0, 7]?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[0, 7] - это список, который мы перебираем.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В задании требуется перебрать символы, которые у Вас записаны в переменной word.
Про перебор списка требования нет. Ну и собственно перебор этого списка здесь не делается. Просто вместе с каждой буквой слова "арзамас" зачем-то выводится "[0,7]".



if word[el] == "а": #проверили каждую букву на соответствие букве а
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для чего нужна эта проверка с использованием el вне цикла?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не могу ответить, уже не помню.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может быть, она просто не нужна? Тем более переменная el имеет смысл только внутри вышеуказанного цикла.

word[el] = "*"



6 changes: 6 additions & 0 deletions Practice/amarkov/modul3_5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
a = "топот"
b = a[:: - 1] # получаем перевёрнутую строку
if a == b: # сравниваем строки
print("True")
else:
print("False")
12 changes: 12 additions & 0 deletions Practice/amarkov/modul4_1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
for i in range(1, 101, 15):
print(i)
if i % 15 == 0:
print("FizzBuzz")
else:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот else должен относиться к вышестоящему if.

if i % 5 == 0:
print("Buzz")
else:
if i % 3 == 0:
print("Fizz")
else:
print(i)
8 changes: 8 additions & 0 deletions Practice/amarkov/modul4_2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
a = input("Введите число: ")
numbers = []

i = 1 # ввели переменную от которой начать счёт

for char in a:
print(f"{i} цифра равна {char}")
i += 1
8 changes: 8 additions & 0 deletions Practice/amarkov/modul4_3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
a = "" # Строка, куда будем набирать символы.
sym = input("Введите символ:")
print(a.isdecimal())

while sym != "stop":
a += sym
sym = input("Введите символ:")
print(a)
14 changes: 14 additions & 0 deletions Practice/amarkov/modul4_4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
a = ("Ты сам-то понял, что написал?", "Аргументируй", "И?") # это кортеж с ответами компъютера


for i in a:
print(i)

b = input("что - то понял, что - то нет: ")

while b != "хватит":
print(a[0])
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Теперь надо вместо 0 использовать переменную и менять её, как Вы это делали в файле modul4_2.py


a = [0]
a += 1
print(a)