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]
3 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]3 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
Describe the certifications developed by SANS. How are they different from InfoSec certifications like CISSP and SSCP?
Nat2105 [25]

Answer:

The certification developed by the SANS is GIAC certification .In this there are 3 certification GSEC,GISF and GCED .The description of these certification is given below .

Explanation:

The GIAC certification course is providing the knowledge of the security like cryptography ,networkig knowledge etc .

GSEC:The GSEC Certification is the certification of the security.It simply means this certification certified about the security risk in the computer system .

GISF: This certification gives the knowledge of the networking as well as the security in the computer system also it gives the knowledge of the cryptography.

GCED :This certification is also providing the knowledge of security as well as networking.

Difference between GIAC and  InfoSec certifications is given below

  • The SANS certification is giving the knowledge about the security risk as well as cryptography by the professional where as the InfoSec certifications providing the knowledge of the hacking by the professional .
  • The SANS is including the certification of  GIAC certification where as the InfoSec certifications is including the  CISSP and SSCP certification .
4 0
3 years ago
The __________ was the first all electronic computer.
spayn [35]

Answer:

its the ENIAC

4 0
3 years ago
Which evidence helps answer the question "Did the girl
Galina-37 [17]

Answer: it’s B, D, and E

5 0
4 years ago
Read 2 more answers
"The goal of this assignment is to give you some experience building a program that uses objects. You will use the BankAccount c
MArishka [77]

Answer:

see explaination

Explanation:

Please find my detailed implementation.

I have tested with Single Bank account object.

You can create array list of Bank Account in test program:

public class BankAccount {

private String name;

private int accountNumber;

private int PIN;

private double balance;

public BankAccount(int accN, int pin) {

accountNumber = accN;

PIN = pin;

}

public BankAccount () {

name = "Undefined";

accountNumber = 0;

PIN = 0;

balance = 0;

}

public String getName() {

return name;

}

public int getAccountNumber() {

return accountNumber;

}

public int getPIN() {

return PIN;

}

public double getBalance() {

return balance;

}

public void setName(String name) {

this.name = name;

}

public void setAccountNumber(int accountNumber) {

this.accountNumber = accountNumber;

}

public void setPIN(int pIN) {

PIN = pIN;

}

public void setBalance(double balance) {

this.balance = balance;

}

public void withdrawal(double amount) {

if(amount <= balance) {

balance = balance - amount;

}

}

public void deposit(double amount) {

balance += amount;

}

public void transferFunds (double amount, BankAccount toBankAccount) {

if(amount >= balance) {

toBankAccount.setBalance(amount + toBankAccount.getBalance());

balance -= amount;

}

}

atOverride //change the at with the at symbol

public String toString() {

return "{id:"+accountNumber+", name:"+name+", pin:"+PIN+", balance:$"+balance+"}";

}

}

#########

public class BankAccountTest {

public static void main(String[] args) {

BankAccount myAccount = new BankAccount(526323450, 1234);

myAccount.setName("Pravesh");

myAccount.setBalance(345.64);

System.out.println(myAccount);

BankAccount anotherAccount = new BankAccount(); //default constructor

System.out.println(anotherAccount);

}

}

3 0
3 years ago
The following algorithm adds all the entries in a square n × n array A. Analyze this algorithm where the work unit is the additi
wlad13 [49]

Answer:

T(n)=n(n+1)/2

Explanation:

See the attached picture for detailed explanation.

6 0
4 years ago
Other questions:
  • When saving a memo you created in Word, which one of the following extensions is automatically assigned to the document?
    13·1 answer
  • Create a GUI application that allows the user to select a rate category (from a set of radio buttons), and enter the number of m
    6·1 answer
  • What is the definition of a command computer?
    15·1 answer
  • Which argument forces a writer to return and change the input berfore resolving unicode erroe
    8·1 answer
  • You receive an e-mail that seems to come from your bank. Clicking on a link in the message takes you to a website that seems to
    8·2 answers
  • You just got a call from the University system administrator, who says that either you or your roommate is issuing denial-of-ser
    8·1 answer
  • Company Wizzy is having trouble with network security. Issues with authentication, viruses, malware/spyware, and other network i
    12·1 answer
  • Ive already tried "word" and "star"
    12·1 answer
  • Suppose that an intermixed sequence of push and pop operations are performed on a LIFO stack. The pushes push the numbers 0 thro
    14·1 answer
  • How to generate random numbers in excel without duplicates
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!