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,23 +5,26 @@ 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",
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
27302 . 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" ,
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
2326words = ur_pyfile .read ()
Original file line number Diff line number Diff line change 1- کچھ = ۵
1+ کچھ = ۱۰۰
22
3- جبتک (کچھ != ۰):
4- چھاپ("سمحا")
5- کچھ -= ۱
3+ جبتک (کچھ >= ۰):
4+ چھاپ("رکن #"، کچھ)
5+ اگر کچھ == ۵۰:
6+ جواب = داخله("کیا آپ ختم کرنا چاھتے ھیں؟ (ج/ن)")
7+ اگر جواب == "ج":
8+ توڑ
9+ کچھ -= ۱
You can’t perform that action at this time.
0 commit comments