Skip to content

Commit 1b4c021

Browse files
committed
صارف سے راے لینے کی سہولت
1 parent 505070a commit 1b4c021

4 files changed

Lines changed: 48 additions & 38 deletions

File tree

README.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,26 @@ 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",
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",
2528
```
2629

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

__pycache__/eng.cpython-38.pyc

129 Bytes
Binary file not shown.

urdu_python.py

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
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",
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",
2124
}
2225

2326
words = ur_pyfile.read()

سامپل۔پے

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
کچھ = ۵
1+
کچھ = ۱۰۰
22

3-
جبتک (کچھ != ۰):
4-
چھاپ("سمحا")
5-
کچھ -= ۱
3+
جبتک (کچھ >= ۰):
4+
چھاپ("رکن #"، کچھ)
5+
اگر کچھ == ۵۰:
6+
جواب = داخله("کیا آپ ختم کرنا چاھتے ھیں؟ (ج/ن)")
7+
اگر جواب == "ج":
8+
توڑ
9+
کچھ -= ۱

0 commit comments

Comments
 (0)