From 073f1ce23d470bd85b0eb7497308f879ee214a48 Mon Sep 17 00:00:00 2001 From: standenboy Date: Mon, 29 Jan 2024 13:03:11 +0000 Subject: added 106 --- comp/hw/106/1.py | 4 ++++ comp/hw/106/2.py | 7 +++++++ comp/hw/106/3.py | 9 +++++++++ 3 files changed, 20 insertions(+) create mode 100644 comp/hw/106/1.py create mode 100644 comp/hw/106/2.py create mode 100644 comp/hw/106/3.py (limited to 'comp/hw') diff --git a/comp/hw/106/1.py b/comp/hw/106/1.py new file mode 100644 index 0000000..f465ed8 --- /dev/null +++ b/comp/hw/106/1.py @@ -0,0 +1,4 @@ +first = input("first name: ") +last = input("last name ") + +print(first[::-1], " ", last[::-1]) diff --git a/comp/hw/106/2.py b/comp/hw/106/2.py new file mode 100644 index 0000000..f537aa4 --- /dev/null +++ b/comp/hw/106/2.py @@ -0,0 +1,7 @@ +num = int(input("num: ")) + +if (num % 2) == 0: + print("its even") +else: + print("is odd") + diff --git a/comp/hw/106/3.py b/comp/hw/106/3.py new file mode 100644 index 0000000..3f48f70 --- /dev/null +++ b/comp/hw/106/3.py @@ -0,0 +1,9 @@ +vowels = ['a','e','i','o','u'] + +counter = 0 +word = input() +for i in word: + for j in vowels: + if j == i: + counter = counter + 1 +print(counter) -- cgit v1.2.3