Generation

generate functionSat, 28 Jan 2023

x=4**2022-6*4**522+5*64**510-3*2**330-100 x is translated into the number system with the base 8. Determine the number of digits "7" in the record of this number

x = 4 ** 2022 - 6 * 4 ** 522 + 5 * 64 ** 510 - 3 * 2 ** 330 - 100 def function(): x = str(x) i = 0 for a in x: if a == '7': i += 1 return i function()

Questions about programming?Chat with your personal AI assistant