From 8bc5978a99081cb215ff1b9a3451fa866b8cd570 Mon Sep 17 00:00:00 2001 From: Deyan Peev Date: Mon, 7 Nov 2022 09:38:58 +0200 Subject: [PATCH 1/2] Typos in text --- Seminar 3/from-class/problem2.md | 2 +- Seminar 3/from-class/problem3.md | 2 +- Seminar 3/from-class/problem4.md | 2 +- Seminar 3/from-class/problem5.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Seminar 3/from-class/problem2.md b/Seminar 3/from-class/problem2.md index be97995..a867998 100644 --- a/Seminar 3/from-class/problem2.md +++ b/Seminar 3/from-class/problem2.md @@ -1,6 +1,6 @@ # Letters contained in a string -Given a list of letters and a string, check if all the list's elements are contained in the string +Given a list of letters and a string, check if all the list's elements are contained in the string. --- Sample input: diff --git a/Seminar 3/from-class/problem3.md b/Seminar 3/from-class/problem3.md index 3b90c8a..368c0c7 100644 --- a/Seminar 3/from-class/problem3.md +++ b/Seminar 3/from-class/problem3.md @@ -1,6 +1,6 @@ # Draw a right-angled triangle -Given an integer number, print a right-angled triangle using the char * with as many lines as the given integer +Given an integer number, print a right-angled triangle using the char * with as many lines as the given integer. --- Sample input: diff --git a/Seminar 3/from-class/problem4.md b/Seminar 3/from-class/problem4.md index 82d5e2e..8a982c6 100644 --- a/Seminar 3/from-class/problem4.md +++ b/Seminar 3/from-class/problem4.md @@ -1,6 +1,6 @@ # Draw an oposite right-angled triangle -Given an integer number, print a right-angled triangle on the opposite side using the char * with as many lines as the given integer +Given an integer number, print a right-angled triangle on the opposite side using the char * with as many lines as the given integer. --- Sample input: diff --git a/Seminar 3/from-class/problem5.md b/Seminar 3/from-class/problem5.md index 2e2ea6f..91ae3ad 100644 --- a/Seminar 3/from-class/problem5.md +++ b/Seminar 3/from-class/problem5.md @@ -1,6 +1,6 @@ # Draw a pyramid -Given an integer number, print a pyramid using the char * with as many lines as the given integer +Given an integer number, print a pyramid using the char * with as many lines as the given integer. --- Sample input: From 8f8ea89b9223598012f71a72ebd6a0e830473318 Mon Sep 17 00:00:00 2001 From: Deyan Peev Date: Thu, 17 Nov 2022 22:00:58 +0200 Subject: [PATCH 2/2] [Seminar 3] Homework problem 1 solved --- Seminar 3/homework/problem1-solved.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Seminar 3/homework/problem1-solved.py diff --git a/Seminar 3/homework/problem1-solved.py b/Seminar 3/homework/problem1-solved.py new file mode 100644 index 0000000..51d2242 --- /dev/null +++ b/Seminar 3/homework/problem1-solved.py @@ -0,0 +1,13 @@ +LETTERS_TO_EXCLUDE = ['a', 'e', 'i', 'o', 'u'] + +words = ["vowel", "consonant"] +new_words = [] + +for word in words: + new_word = [] # the word will be array of characters wich will later be joined in a string + for letter in word: + if letter.casefold() not in LETTERS_TO_EXCLUDE: + new_word.append(letter) + new_words.append("".join(new_word)) + +print(new_words)