+ 1

pseudo code to python

help me to convert this pseudocode function RightToLeft(nilai) pos=1 while decimal > 0 do A[pos]=nilai%16 nilai=nilai/16 pos=pos+1 end while for i = 1 to (pos-1)/2 do temp=A[i] A[i]=A[pos-i] A[pos-i]=temp end for

5th Jan 2017, 9:10 AM
Angel
Angel - avatar
7 ответов
+ 1
convert hexadecimal
5th Jan 2017, 10:28 AM
Angel
Angel - avatar
+ 1
num=int(input()) conv=[] while num>0: part=int(num%16) conv.append(part) num= int(num/16) conv.reverse() print(conv)
5th Jan 2017, 11:12 AM
Shoaib Azam
Shoaib Azam - avatar
+ 1
Henr
10th Jan 2017, 8:36 PM
Jonah Burnswell
Jonah Burnswell - avatar
0
what do you want to do with it?
5th Jan 2017, 10:21 AM
Shoaib Azam
Shoaib Azam - avatar
0
ill try it.but the problem in this pseudo code(and hexadecimal conv) would be that 30 will be converted to 114 not 1E.
5th Jan 2017, 10:33 AM
Shoaib Azam
Shoaib Azam - avatar
0
oke no problem just send it
5th Jan 2017, 10:34 AM
Angel
Angel - avatar
0
ill help too for the converted
5th Jan 2017, 10:35 AM
Angel
Angel - avatar