Użytkownik:Gal/Brudnopis: Różnice pomiędzy wersjami
brak opisu edycji
Nie podano opisu zmian |
Nie podano opisu zmian |
||
| Linia 1: | Linia 1: | ||
== Python kod == | |||
odnośnie https://github.com/piotrbajdek/lng-cv/wiki | |||
# Online Python compiler (interpreter) to run Python online. | |||
# Write Python 3 code in this online editor and run it. | |||
standardConsonants = ['b','d','f','g','i','j','k','l','m','n','p', 'r', 's','t','z'] | |||
vowels = ['a','e','i','o','u','ö','ü'] | |||
endings = [' ', ',', '.', '!', '?', ';', ':'] | |||
while True: | |||
word = input('Wpisz: ') | |||
#Wieloznaki i podobne | |||
word = word.replace('tz', 'zz') # 2 z bo wydłuża | |||
word = word.replace('ei', '₪') | |||
word = word.replace('äu', '☼') | |||
word = list(word + ' ') #dodaję spacje, żeby i koniec inputu ładnie się analizował | |||
i = 0 | |||
result = '' | |||
while i < len(word): | |||
if word[i] in vowels: | |||
if word[i+1] in standardConsonants and word[i+2] in vowels: | |||
result += word[i] + word[i] | |||
elif word[i+1] == 'h': | |||
result += word[i] + word[i] | |||
i = i + 1 | |||
elif word[i] == 'i' and word[i+1] == 'e': | |||
result += word[i] + word[i] | |||
i = i + 1 | |||
else: | |||
result += word[i] | |||
else: | |||
if word[i] in standardConsonants and word[i] == word[i+1]: | |||
result += word[i] | |||
i = i + 1 | |||
else: | |||
result += word[i] | |||
i = i + 1 | |||
result = result.replace('₪', 'ei') | |||
result = result.replace('☼', 'äu') | |||
print(result) | |||
== Małżeństwo w różnych wyznaniach == | |||
{| class="wikitable" | {| class="wikitable" | ||
| | | | ||