diff --git a/Practice/amarkov/exzample.py b/Practice/amarkov/exzample.py new file mode 100644 index 00000000..d4475b2f --- /dev/null +++ b/Practice/amarkov/exzample.py @@ -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,) \ No newline at end of file diff --git a/Practice/amarkov/modul3_3/moduk3_3(1).py b/Practice/amarkov/modul3_3/moduk3_3(1).py new file mode 100644 index 00000000..e9ca309e --- /dev/null +++ b/Practice/amarkov/modul3_3/moduk3_3(1).py @@ -0,0 +1,5 @@ +a = input("введите первое число: ") +b = input("введите второе число: ") +print("Result",int(a) + int(b)) + + diff --git a/Practice/amarkov/modul3_3/modul3_3(2).py b/Practice/amarkov/modul3_3/modul3_3(2).py new file mode 100644 index 00000000..330aca70 --- /dev/null +++ b/Practice/amarkov/modul3_3/modul3_3(2).py @@ -0,0 +1,3 @@ +a = input("введите первое число: ") +b = input("введите второе число: ") +decod = print("Result",int(a) - int(b)) diff --git a/Practice/amarkov/modul3_4.py b/Practice/amarkov/modul3_4.py new file mode 100644 index 00000000..036fc026 --- /dev/null +++ b/Practice/amarkov/modul3_4.py @@ -0,0 +1,12 @@ +word = "арзамас" +print(len(word)) # узнал сколько в слове символов + +for el in range(len(word)): # перебрал слово в цикле + print(el,[0,7]) + + +if word[el] == "а": #проверили каждую букву на соответствие букве а + word[el] = "*" + + + diff --git a/Practice/amarkov/modul3_5.py b/Practice/amarkov/modul3_5.py new file mode 100644 index 00000000..5a022fa0 --- /dev/null +++ b/Practice/amarkov/modul3_5.py @@ -0,0 +1,6 @@ +a = "топот" +b = a[:: - 1] # получаем перевёрнутую строку +if a == b: # сравниваем строки + print("True") +else: + print("False") diff --git a/Practice/amarkov/modul4_1.py b/Practice/amarkov/modul4_1.py new file mode 100644 index 00000000..d34448f8 --- /dev/null +++ b/Practice/amarkov/modul4_1.py @@ -0,0 +1,12 @@ +for i in range(1, 101, 15): + print(i) + if i % 15 == 0: + print("FizzBuzz") +else: + if i % 5 == 0: + print("Buzz") + else: + if i % 3 == 0: + print("Fizz") + else: + print(i) diff --git a/Practice/amarkov/modul4_2.py b/Practice/amarkov/modul4_2.py new file mode 100644 index 00000000..4a968633 --- /dev/null +++ b/Practice/amarkov/modul4_2.py @@ -0,0 +1,8 @@ +a = input("Введите число: ") +numbers = [] + +i = 1 # ввели переменную от которой начать счёт + +for char in a: + print(f"{i} цифра равна {char}") + i += 1 diff --git a/Practice/amarkov/modul4_3.py b/Practice/amarkov/modul4_3.py new file mode 100644 index 00000000..e693c804 --- /dev/null +++ b/Practice/amarkov/modul4_3.py @@ -0,0 +1,8 @@ +a = "" # Строка, куда будем набирать символы. +sym = input("Введите символ:") +print(a.isdecimal()) + +while sym != "stop": + a += sym + sym = input("Введите символ:") + print(a) diff --git a/Practice/amarkov/modul4_4.py b/Practice/amarkov/modul4_4.py new file mode 100644 index 00000000..5d6d8505 --- /dev/null +++ b/Practice/amarkov/modul4_4.py @@ -0,0 +1,14 @@ +a = ("Ты сам-то понял, что написал?", "Аргументируй", "И?") # это кортеж с ответами компъютера + + +for i in a: + print(i) + +b = input("что - то понял, что - то нет: ") + +while b != "хватит": + print(a[0]) + +a = [0] +a += 1 +print(a) \ No newline at end of file