File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,26 +5,28 @@ Write simple Python in Urdu.
551 . Write Urdu code in ``` سامپل۔پے ```
66The 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
30322 . Translate and run the code in one command: ``` python urdu_python.py ```
Original file line number Diff line number Diff line change 11ur_pyfile = open ("سامپل۔پے" )
22
33language_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
2629words = ur_pyfile .read ()
Original file line number Diff line number Diff line change 55 اگر کچھ == ۵۰:
66 جواب = داخله("کیا آپ ختم کرنا چاھتے ھیں؟ (ج/ن)")
77 اگر جواب == "ج":
8+ چھاپ("اللہ ہافظ!")
89 توڑ
10+ ورنہ اگر جواب == "ن":
11+ چھاپ("آگے چلتے ہیں!")
12+ ورنہ:
13+ چھاپ("سمجھ نہیں آئ۔۔۔")
14+ جاری
915 کچھ -= ۱
You can’t perform that action at this time.
0 commit comments