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: 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)