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
Aliun [14]
3 years ago
5

What is the missing line?

Computers and Technology
1 answer:
gregori [183]3 years ago
4 0

Correct question:

What is the missing line?

>>> myDeque = deque('math')

>>> myDeque

deque(['m', 'a', 't'])

Answer:

myDeque.pop()

Explanation:

The double ended queue, deque found in the python collection module is very similar to a python list and can perform operations such as delete items, append and so on.

In the program written above, the missing line is the myDeque.pop() as the pop() method is used to delete items in the created list from the right end of the list. Hence, the 'h' at the right end is deleted and we have the output deque(['m', 'a', 't'])

myDeque.popleft () deletes items from the right.

You might be interested in
Write the Number class that can be used to test if the number is odd, even, and perfect. A perfect number is any number that is
egoroff_w [7]

Answer:

Explanation:

The following code is written in Python. It creates a class that takes in one ArrayList parameter and loops through it and calls two functions that check if the numbers are Perfect, Odd, or Even. Then it goes counting each and printing the final results to the screen.

class NumberAnalyzer:

   def __init__(self, myArray):

       perfect = 0

       odd = 0

       even = 0

       for element in myArray:

           if self.isPerfect(element) == True:

               perfect += 1

           else:

               if self.isEven(element) == True:

                   even += 1

               else:

                   odd += 1

       print("# of Perfect elements: " + str(perfect))

       print("# of Even elements: " + str(even))

       print("# of Odd elements: " + str(odd))

   def isPerfect(self, number):

       sum = 1

       i = 2

       while i * i <= number:

           if number % i == 0:

               sum = sum + i + number / i

           i += 1

       if number == sum:

           return True

       else:

           return False

   def isEven(self, number):

       if (number % 2) == 0:

           return True

       else:

           return False

6 0
3 years ago
Select the correct answer.
galben [10]

Answer:

the RAM if i am not mistaking

8 0
4 years ago
How is cropping different from scaling?​
Keith_Richards [23]

Answer:

Scaling changes the size of the whole image by resampling it(duplicating the pixels). in cropping you only get a part of the original image/ remove the outer area of it .

Explanation:

8 0
3 years ago
1. Actuators apply mechanical force in the form of pressure to overcome
Harman [31]
The answer is d torque because
3 0
3 years ago
Attackers have recently launched several attacks against servers in your organization’s DMZ. You are tasked with identifying a s
kari74 [83]

Answer:

Option B is correct.

Explanation:

Well into the DMZ corporation of the user, intruders have currently conducted numerous attempts toward networks. He is associated with finding any response which would provide the greatest opportunity in the future to avoid such threats.  

The in-band IPS becomes the better approach for the required choices. Traffic moves via the IPS, as well as it has a better probability of avoiding inner processes through entering invasion.

4 0
3 years ago
Other questions:
  • What does the Autosum feature on excel do?
    15·1 answer
  • What are some measurements used to determine water waste from leaking faucets?
    10·1 answer
  • When people talk about "the media," they often mean:?
    6·1 answer
  • Which describes which CTSO each student should join?]
    7·1 answer
  • Define a romanNumberToInt function that converts a RomanNumber value, which is a list of Roman digits, into an integer. Hints: -
    7·1 answer
  • Gina wants to consistently format the headings in all of her worksheets.. . Which is a quick way to do so?. A)Format the heading
    10·1 answer
  • What is collaboration
    14·1 answer
  • Use the table on the right to convert from binary to decimal.
    11·2 answers
  • The Internet is based on a U.S. government project called ________. Today, the Internet is a collection of networks, tied togeth
    5·1 answer
  • Write essay about pokhara​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!