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
ki77a [65]
4 years ago
6

A) How could you modify Shelve with a technique discussed in class so that you can create Shelve instances that contain // Tools

, Dishes or any other kind of object? // B) Create a function that takes in two shelves
Computers and Technology
1 answer:
Kay [80]4 years ago
3 0

Answer:

See explanation

Explanation:

A “shelf” is a dictionary-like object. A shelf is an arbitrary Python objects, that is; anything that the pickle module can handle. This includes recursive data types and objects containing lots of shared sub-objects. It must be noted that the keys are ordinary strings.

(A). modification to Shelve can be done by following this instructions;

(1). Do not redefine built-in functions,(2). grab shelved item, mutate item, write mutated item back to shelf.

The number (2) instructions is during iteration over shelved items.

(B). CREATING FUNCTIONS THAT TAKES IN TWO SHELVES;

import shelve

d = shelve.open(filename) # open -- file may get suffix added by low-level

# library

d[key] = data # store data at key (overwrites old data if

# using an existing key)

data = d[key] # retrieve a COPY of data at key (raise KeyError if no

# such key)

del d[key] # delete data stored at key (raises KeyError

# if no such key)

flag = key in d # true if the key exists

klist = list(d.keys()) # a list of all existing keys (slow!)

# or, d=shelve.open(filename,writeback=True) would let you just code

# d['xx'].append(5) and have it work as expected, BUT it would also

# consume more memory and make the d.close() operation slower.

d.close() # close it

You might be interested in
Overcoming the fundamental attribution error requires making an effort to shift an external attribution into an internal attribu
Irina-Kira [14]

The correct answer on Edgen is:

(B.) False

I just took the test and this is the right answer.

8 0
4 years ago
Read 2 more answers
Which of the following is true about named ranges?
ohaa [14]

Answer:

Regarding a named range, the scope of a name is the location within which Excel recognizes the name without qualification. ... Once you name a range, you can change the size of the range using the Name Manager. True. You can create a new range by selecting the cells and typing a name in the Name box next to the formula bar ...

This is true about a range names. Hoped this helped a little. Im not sure which following you mean. maybe next time you can put a picture or descirbe it a little more or what the otions are.

I Hope You Have a Good Day or Night!! :)

Explanation:

5 0
3 years ago
Which of the following is NOT a possible duty for a professional working in the Web and Digital Communications pathway?
Harlamova29_29 [7]

Answer:

creating computer software

Explanation:

HOPE THIS HELPS!!!

8 0
3 years ago
WILL MARK BRAINLIEST FOR ANYONES ANSWER!
Anvisha [2.4K]

Answer:

just know that bit gonna be running when I make mine Imma have 720 fps btw today sponsored is nord VPN

4 0
3 years ago
python If the checksum is 10, the last digit is denoted as X according to the ISBN-10 convention. Write a program that prompts t
aksik [14]

Answer:

PYTHON CODE:

str = input("Enter the first 9 digits of an ISBN-10 as a string : ") # user input

i = 1

checksum = 0 # for total sum

while i < 10:

c = int(str[i - 1]) # getting every digit of the ISBN

c = c * i

checksum += c

i=i+1

checksum=checksum % 11 # getting the last digit of ISBN

ch=checksum

if checksum==10: # if the last digit is 10 then change it to X

ch="X"

print("The Complete 10-Digit ISBN is : ",end="")

print(str,end="") # displaying the 9 digit of ISBN

print(ch) # appending the last digit of ISBN

Explanation:

3 0
3 years ago
Other questions:
  • A process-based DO/S must synchronize actions across the network. When a process reaches a point at which it needs service from
    6·1 answer
  • True or False? When shooting OTS shots of two actors / subjects speaking to each other, it is best to place the camera(s) over t
    10·1 answer
  • HELP QUICK!!!
    14·2 answers
  • What are the advantages of a peer-to-peer network? Select all that apply.
    15·1 answer
  • 8. Seleccione la respuesta correcta de acuerdo con las opciones que aparece a continuación:
    11·1 answer
  • What is the first step in planning a multi-table query?
    14·1 answer
  • A block level element begins on a new line and some space is usually added before and after it - True or False?
    13·1 answer
  • While Joe's wife Molly and daughter Sunny did not mind moving,his son Daniel was not too happy with the sudden change in their l
    12·1 answer
  • Select the correct answer.
    5·1 answer
  • Cute nya diba I like bts army​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!