Generation

generate functionSat, 28 Jan 2023

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

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

Questions about programming?Chat with your personal AI assistant