Skip to content

Commit d9b650d

Browse files
committed
lang: ukrainian
1 parent af9ac7d commit d9b650d

5 files changed

Lines changed: 97 additions & 0 deletions

File tree

urdupython/languages/ua/__init__.py

Whitespace-only changes.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
letters:
2+
start : "Ж"
3+
end : "і"
4+
5+
numbers:
6+
start : "0"
7+
end : "9"
8+
9+
reserved:
10+
"друкувати" : "print"
11+
"інакшеякщо" : "elif"
12+
"якщо" : "if"
13+
"інше" : "else"
14+
"поки" : "while"
15+
"для" : "for"
16+
"в" : "in"
17+
"введення" : "input"
18+
"перерву" : "break"
19+
"продовжувати" : "continue"
20+
"пропуск" : "pass"
21+
"правда" : "True"
22+
"помилковий" : "False"
23+
"є" : "is"
24+
"клас" : "class"
25+
"зах" : "def"
26+
"__уцьому__" : "__init__"
27+
"себе" : "self"
28+
"повернення" : "return"
29+
"рядок" : "string"
30+
"вул" : "str"
31+
"додавати" : "append"
32+
"поп" : "pop"
33+
"і" : "and"
34+
"або" : "or"
35+
"все" : "all"
36+
"будьякий" : "any"
37+
"Жодного" : "None"
38+
"внутр" : "int"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Simple conditional in Ukrainian
2+
3+
a = 1
4+
5+
якщо a == 1:
6+
друкувати ("Hello")
7+
інакшеякщо a == 1:
8+
друкувати ("World")
9+
інше:
10+
друкувати ("Didn't understand۔۔۔")

utils/data.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
друкувати
2+
інакшеякщо
3+
якщо
4+
інше
5+
поки
6+
для
7+
в
8+
введення
9+
перерву
10+
продовжувати
11+
пропуск
12+
правда
13+
помилковий
14+
є
15+
клас
16+
зах
17+
уцьому
18+
себе
19+
повернення
20+
рядок
21+
вул
22+
додавати
23+
поп
24+
і
25+
або
26+
все
27+
будьякий
28+
Жодного
29+
внутр

utils/readascii.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
with open('data.txt', 'r') as file:
2+
data = file.read()
3+
print ("data:", data)
4+
5+
min_ascii = 1000000
6+
max_ascii = -1
7+
8+
for char in data:
9+
print ("letter " + char + " has Ascii = " + str(ord(char)))
10+
11+
if ord(char) == 10:
12+
continue
13+
14+
if ord(char) < min_ascii:
15+
min_ascii = ord(char)
16+
if ord(char) > max_ascii:
17+
max_ascii = ord(char)
18+
19+
print (chr(min_ascii), "is the smallest ascii having number = ", min_ascii)
20+
print (chr(max_ascii), "is the largest ascii having number = ", max_ascii)

0 commit comments

Comments
 (0)