Respuesta :
Answer:
Explanation:
def octal_to_string(octal):
result = ''
value_letters = [(4, 'r'), (2, 'w'), (1, 'x')]
for c in [int(n) for n in str(octal)]:
for value, letter in value_letters:
if c >= value:
result += letter
c -= value
else:
result += '-'
return result
print(octal_to_string(755))
print(octal_to_string(644))
print(octal_to_string(750))
print(octal_to_string(600))
**************************************************
In this exercise, using the knowledge of computational language in linux, we have that this code will be written as:
The code is in the attached image.
We can write the linux as:
result = ''
value_letters = [(4, 'r'), (2, 'w'), (1, 'x')]
for c in [int(n) for n in str(octal)]:
for value, letter in value_letters:
if c >= value:
result += letter
c -= value
else:
result += '-'
return result
print(octal_to_string(755))
print(octal_to_string(644))
print(octal_to_string(750))
print(octal_to_string(600))
See more about linux at brainly.com/question/15122141
