<prompt> Idadi: 10Kuandika kanuni kubadilisha idadi kwa uwakilishi wake binary.  <response>: Here is one way to convert a decimal number to its binary representation in Python:pythondef decimal_to_binarynum: binary while num 0: binary strnum 2 num 2 return binary::-1 Test the above functionnum 10printdecimal_to_binarynumThis would output: 1010 which is the binary representation of the number 10. 