1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vitfil [10]
4 years ago
13

The permissions of a file in a Linux system are split into three sets of three permissions: read, write, and execute for the own

er, group, and others. Each of the three values can be expressed as an octal number summing each permission, with 4 corresponding to read, 2 to write, and 1 to execute. Or it can be written with a string using the letters r, w, and x or - when the permission is not granted. For example: 640 is read/write for the owner, read for the group, and no permissions for the others; converted to a string, it would be: "rw-r-----" 755 is read/write/execute for the owner, and read/execute for group and others; converted to a string, it would be: "rwxr-xr-x" Fill in the blanks to make the code convert a permission in octal format into a string format. ?? python code
Computers and Technology
1 answer:
Reptile [31]4 years ago
7 0

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))

**************************************************

You might be interested in
Which type of software coordinates the hardware and software of a computer to work efficiently and productively?
Mariana [72]
A. the operating system handles the I/O devices with the cpu, :)
7 0
4 years ago
Read 2 more answers
As the internet continues to expand and become vital to everyday life, it may become more regulated with rules just like our eve
denis23 [38]
I can't see all of option D, but it is potentially correct. Please tell me what option D is and I will tell you if it is option "B" or option "D."
5 0
3 years ago
Read 2 more answers
How do i know my child's login info for parent infinite campus
Oliga [24]

Answer:

Logging in from a Web Browser

Visit infinitecampus.com and click Login at the top right.

Search for your District Name and State. Select your district from the list.

Click Parent/Student.

Click either Campus Parent or Campus Student.

Enter the Username and Password provided by your school. ...

Click Log In!

Explanation:

5 0
3 years ago
Assume the number variable contains the number 1000.
Inga [223]

Answer:

Explanation:

We could get the four options for this particular example, but we must know what happens with the variable number the value 1000.

In this case, we are going to assume four scenarios:

1) n = n - n this is equal to 0

2) n = (n - n) + n = 1000

3) n = n * 2 = 2000

4) n = n * 3 = 3000

These are simple examples, we could get these options in different ways.

5 0
3 years ago
"Margaret has $3,200 cash after selling off her television, DVD player, and computer. She has debts of $4,800 owing to the follo
serg [7]

Answer: Hyatt's  will be able to collect $1,365

Explanation: Composition Agreement is a kind of agreement reached between a debtor and its creditors. it a kind of agreement whereby the debtor and creditors agree to collect a percentage of their debts to fully settle their debts from the creditor.

For instance Margaret with a cash of $3,200 to settle a debt of $4,800.

In this case Margaret can decide to pay 65% of the total debts to settle the final debts. Here, Hyatt's  will be able to collect $1,365 as full settle of his debt.

5 0
3 years ago
Other questions:
  • What type of devices are a keyboard and a mouse?
    7·1 answer
  • What characteristics need to be exhibited by an organisation to improve its software process?
    7·1 answer
  • Decrypt the message OPEHHISTLWILKWPR which is the cyphertext produced by encrypting a plaintext message using the transposition
    14·1 answer
  • You must establish credit in order to buy a house true or false
    5·2 answers
  • I play Among us :) hbu
    7·2 answers
  • 1st row has 3 possible answers software program, web page, and web browser
    8·1 answer
  • (Help please I don't know what to choose because it's both text and email but I can only pick one. HELP!!!!!!!!!!)
    6·2 answers
  • We will extend this idea to streams. Write a function called rle that takes in a stream of data, and returns a corresponding str
    5·1 answer
  • Việc áp dụng khai báo hải quan điện tử có áp dụng chữ ký số, đem lại những lợi ích gì
    10·1 answer
  • What are the four major software packages of microsoft​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!