Skip to content

Commit 97b09df

Browse files
committed
ورنہ اگر اور گزر کی سہولت
1 parent 1b4c021 commit 97b09df

4 files changed

Lines changed: 51 additions & 40 deletions

File tree

README.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,28 @@ Write simple Python in Urdu.
55
1. Write Urdu code in ```سامپل۔پے```
66
The mappings are as following:
77
```
8-
"،": ",",
9-
"۱": "1",
10-
"۲": "2",
11-
"۳": "3",
12-
"۴": "4",
13-
"۵": "5",
14-
"۶": "6",
15-
"۷": "7",
16-
"۸": "8",
17-
"۹": "9",
18-
"۰": "0",
19-
"چھاپ": "print",
20-
"اگر": "if",
21-
"ورنہ": "else",
22-
"جبتک": "while",
23-
"جو": "for",
24-
"اندر": "in",
25-
"داخله": "input",
26-
"توڑ": "break",
27-
"جاری": "continue",
8+
"،": ",",
9+
"۱": "1",
10+
"۲": "2",
11+
"۳": "3",
12+
"۴": "4",
13+
"۵": "5",
14+
"۶": "6",
15+
"۷": "7",
16+
"۸": "8",
17+
"۹": "9",
18+
"۰": "0",
19+
"چھاپ": "print",
20+
"ورنہ اگر": "elif",
21+
"اگر": "if",
22+
"ورنہ": "else",
23+
"جبتک": "while",
24+
"جو": "for",
25+
"اندر": "in",
26+
"داخله": "input",
27+
"توڑ": "break",
28+
"جاری": "continue",
29+
"گزر": "pass",
2830
```
2931

3032
2. Translate and run the code in one command: ```python urdu_python.py```

__pycache__/eng.cpython-38.pyc

143 Bytes
Binary file not shown.

urdu_python.py

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
ur_pyfile = open("سامپل۔پے")
22

33
language_dict = {
4-
"،": ",",
5-
"۱": "1",
6-
"۲": "2",
7-
"۳": "3",
8-
"۴": "4",
9-
"۵": "5",
10-
"۶": "6",
11-
"۷": "7",
12-
"۸": "8",
13-
"۹": "9",
14-
"۰": "0",
15-
"چھاپ": "print",
16-
"اگر": "if",
17-
"ورنہ": "else",
18-
"جبتک": "while",
19-
"جو": "for",
20-
"اندر": "in",
21-
"داخله": "input",
22-
"توڑ": "break",
23-
"جاری": "continue",
4+
"،": ",",
5+
"۱": "1",
6+
"۲": "2",
7+
"۳": "3",
8+
"۴": "4",
9+
"۵": "5",
10+
"۶": "6",
11+
"۷": "7",
12+
"۸": "8",
13+
"۹": "9",
14+
"۰": "0",
15+
"چھاپ": "print",
16+
"ورنہ اگر": "elif",
17+
"اگر": "if",
18+
"ورنہ": "else",
19+
"جبتک": "while",
20+
"جو": "for",
21+
"اندر": "in",
22+
"داخله": "input",
23+
"توڑ": "break",
24+
"جاری": "continue",
25+
"گزر": "pass",
26+
2427
}
2528

2629
words = ur_pyfile.read()

سامپل۔پے

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@
55
اگر کچھ == ۵۰:
66
جواب = داخله("کیا آپ ختم کرنا چاھتے ھیں؟ (ج/ن)")
77
اگر جواب == "ج":
8+
چھاپ("اللہ ہافظ!")
89
توڑ
10+
ورنہ اگر جواب == "ن":
11+
چھاپ("آگے چلتے ہیں!")
12+
ورنہ:
13+
چھاپ("سمجھ نہیں آئ۔۔۔")
14+
جاری
915
کچھ -= ۱

0 commit comments

Comments
 (0)