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
zvonat [6]
3 years ago
13

Write Python expressions corresponding to these statements:

Computers and Technology
1 answer:
Luda [366]3 years ago
7 0

Answer:

The code with explanatory comments are given in Python below

Explanation:

#2.22

s = "Lionel Pogba"   #string s with names having LP as initials

names = s.split()  #splits the string into individual characters

initial = ""  #we are initialising the initials as an empty string

for i in names:

   initial += i[0]  #making the initials of the string

print(initial)

#2.23

l = [3, 7, -2, 12]  

range = (max(l) - min(l))  #declare and initialise variable range for the range

print(range) #output of the range

#2.24

l1 = [3, 7, 17, -2, 12]

#(a)

midIndex = int(len(l1)/2)  #evaluates half the length of the list

#which corresponds to the middle index of the list

print(midIndex)

#(b)

print(l1[midIndex])  #assigns the value of the middle index of the list

#corresponding to the middle element

#(c)

l1.sort(reverse=True) #reverses the elements of the list to descending order

print(l1)

#(d)

firstValue = l1[0]  #firstValue variable representing the first element

l1 = l1[1:] + [firstValue] #assigning the location to the last position

print(l1)

You might be interested in
A safety procedure that enables a trusted party to have a copy of the encryption key is called key __________.
Anuta_ua [19.1K]

The safety procedure that enables a trusted party to have a copy of the encryption key is called key escrow.

<h3>What is encryption?</h3>

The process to convert data into a coded message that conceals its real meaning is known as encryption.

As we know,

Key escrow is the security measure that makes it possible for a reliable third party to own a copy of the encryption key.

Electronic cash systems employ encrypting to secure traditional transaction information like account information and activity amounts.

Thus, the safety procedure that enables a trusted party to have a copy of the encryption key is called key escrow.

Learn more about encryption here:

brainly.com/question/17017885

#SPJ4

7 0
2 years ago
Consider the following recursive method: public int someFun(int n) { if (n &lt;= 0) return 2; else return someFun(n-1) * someFun
Stella [2.4K]

Answer:

(a) someFunc(3) will be called 4 times.

(b) For non negative number n someFunc method calculates 2^2^n.

Explanation:

When you call someFunc(5) it will call someFunc(4) two time.

So now we have two someFunc(4) now each someFunc(4) will call someFunc(3) two times.Hence the call to someFun(3) is 4 times.

someFunc(n) calculates someFunc(n-1) two times and calculates it's product.

someFunc(n) = someFunc(n-1)^2..........(1)

someFunc(n-1)=someFunc(n-2)^2..........(2)

substituting the value form eq2 to eq 1.

someFunc(n)=someFunc(n-2)^2^2

       .

       .

       .

       .

= someFunc(n-n)^2^n.

=2^2^n

2 raised to the power 2 raised to the power n.

3 0
3 years ago
In which technique does a group rate or rank a set of information, compile the results and repeat until everyone is satisfied wi
garik1379 [7]
The correct option is DELPHI. Delphi technique is a structured and systematic method used in forecasting. The method often involve sending several rounds of questionnaires to experts. The anonymous responses are then gathered together and shared with the concerned group after each round of answers are received. 
5 0
3 years ago
The incandescent test lamp is used to check for the presence of A. AC current. B. DC voltage. C. DC current.
andriy [413]
Incandescent test lamps are used to check for Alternating Current Voltage and Direct Current Voltage. 

The answer is AC Voltage and DC Voltage. 
5 0
3 years ago
Read 2 more answers
A software design team is working on a new computer operating system. they analyze the market and work to develop new software u
steposvetlana [31]
They use Trial and Error.
5 0
3 years ago
Other questions:
  • To include totals and other statistics at the bottom of a datasheet, click the ____ button on the HOME tab to include the Total
    12·1 answer
  • Which of the following is true about a point-and-shoot camera? They always have lenses that you can take on and off. They are of
    8·2 answers
  • When Building a resume what would i put when it says field of study especially when your still going to high school?​
    13·1 answer
  • E-commerce creates a great deal of data on how consumers interact with a website. L.L.Bean keeps records that show how quickly c
    13·1 answer
  • 1.   Which of the following is an example of a primary cost of an accident or injury?
    5·2 answers
  • You're the network administrator for a company that has just expanded from one floor to two floors of a large building, and the
    13·1 answer
  • True or false questions. If a statement is false, you must explain the reason why it is false: a). Suppose that TCP is being run
    12·2 answers
  • The purpose of a report is to
    13·1 answer
  • As featured on Wednesday's show: Researchers in Florida have observed less human impact on what kind of reptile, which nests on
    7·1 answer
  • Which computer peripheral is used when you would like to use a DVD or CD?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!