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
zheka24 [161]
2 years ago
12

5.4.6: Rolling Dice code

Computers and Technology
1 answer:
ziro4ka [17]2 years ago
4 0
It is 15 all together
You might be interested in
In python please:
Vikki [24]

Answer:

"

if 'marsupial' in dictionary:

   del dictionary['marsupial']

else:

   print("The key marsupial is not in the dictionary")

"

Explanation:

So you can use the keyword "in" to check if a certain key exists.

So the following code:

"

if key in object:

   # some code

"

will only run if the value of "key" is a key in the object dictionary.

So using this, we can check if the string "marsupial' exists in the dictionary.

"

if 'marsupial' in dictionary:

   # code

"

Since you never gave the variable name for the variable that references a dictionary, I'm just going to use the variable name "dictionary"

Anyways, to delete a key, there are two methods.

"

del dictionary[key]

dictionary.pop(key)

"

Both will raise the error "KeyError" if the key doesn't exist in the dictionary, although there is method with pop that causes an error to not be raised, but that isn[t necessary in this case, since you're using the if statement to check if it's in the dictionary first.

So I'll just use del dictionary[key] method here

"

if 'marsupial' in dictionary:

   del dictionary['marsupial']

else:

   print("The key marsupial is not in the dictionary")

"

The last part which I just added in the code is just an else statement which will only run if the key 'marsupial' is not in the dictionary.

3 0
2 years ago
CHOOSE THE CORRECT CONTINUOUS TENSES( PRESENT CONTINUOUS,PAST CONTINUOUS AND FUTURE CONTINUOUS) : 1. I saw a snake while I _____
k0ka [10]

Answer:

Explanation:

joe biden>

7 0
2 years ago
State four input device that are used for playing gaming programs​
bekas [8.4K]

Answer:

Mouse, Keyboard, Headphones, Charger.

Explanation:

These can be plugged into the computer for gaming and other uses.

5 0
2 years ago
Read 2 more answers
There is an interface I that has abstract class AC as its subclass. Class C inherits AC. We know that C delegates to an object o
Aloiza [94]

Answer:

are u in HS or college work

I am trying to understand

6 0
2 years ago
Develop an sec (single error correction) code for a 16-bit data word. generate the code for the data word 0101000000111001. show
natita [175]

Answer:

010100000001101000101

Explanation:

When an error occurs in data bits, the SEC code is used to determine where the error took place. 5 check-bits are needed to generate SEC code for 16-bits data word. The check bits are:

C16=0, C8=0, C4=0,C2=0,C1=1

Therefore the SEC code is 010100000001101000101

7 0
3 years ago
Read 2 more answers
Other questions:
  • considering that two variables counters and accumulators are important in loop design. What would be their purpose?
    9·1 answer
  • Assume that the following code exists inside a method of SomeClass, and that this code compiles without errors:
    13·1 answer
  • Can anybody come up with a catchy title for this?
    11·1 answer
  • 5. The hazardous component in most antifreeze is _____, which is extremely toxic to humans and animals. A) Calcium Carbonate B)
    13·2 answers
  • 8) The higher the drag coefficient, the_____ the car will go<br> a)Siower<br> b)Faster
    9·2 answers
  • Technician A says that front and rear U-joints on a RWD axle should operate at different angles to prevent vibration. Technician
    10·1 answer
  • In the language of the World Wide Web, "this page cannot be displayed" means A. your computer's software is damaged. B. the ISP
    10·2 answers
  • Stacy plans to print her contacts and would like to choose an option that will print select information for each contact in a bu
    12·1 answer
  • ________ helps in determining the cause of a security threat in an incident response plan. Question 7 options: A) Restricting sy
    5·1 answer
  • Is each of the following method identifiers (a) legal and conventional, (b) legal but unconventional, or (C) illegal?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!