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
tester [92]
2 years ago
11

In python, what is the difference between a dictionary and a set? How are they similar?

Computers and Technology
1 answer:
yuradex [85]2 years ago
4 0

Answer:

"A set is an unordered collection. A dictionary is an unordered collection of data that stores data in key-value pairs."

Explanation:

Set =>

Collection of non-repetitive elements.

Unordered

Unindexed

No way to change items.

Dictionary =>

Collection of key-value pairs.

Unordered

Indexed

Mutable

You might be interested in
In an office there is a unisex bathroom with n toilets. The bathroom is open to both men and women, but it cannot be used by men
Gnesinka [82]

Answer:

Check the explanation

Explanation:

#include <stdio.h>

#include <stdlib.h>

#include <pthread.h>

#include <semaphore.h>

int mcount,wcount;

sem_t x,y,z,wsem,msem,cap;

void delay(void)

{

int i;

int delaytime;

delaytime = random();

for (i = 0; i<delaytime; i++);

}

void *woman(void *param)

{

sem_wait(&z);

sem_wait(&wsem);

sem_wait(&y);

wcount++;

if(wcount==1)

{ sem_wait(&msem); }

sem_post(&y);

sem_post(&wsem);

sem_post(&z);

sem_wait(&cap);

printf("woman in!\n");

delay();

printf("\twoman out!\n");

sem_post(&cap);  

sem_wait(&y);

wcount--;

if(wcount==0)

{ sem_post(&msem); }

sem_post(&y);

}

void *man(void *param)

{  

sem_wait(&z);

sem_wait(&msem);

sem_wait(&x);

mcount++;

if(mcount==1)

{ sem_wait(&wsem); }

sem_post(&x);

sem_post(&msem);

sem_post(&z);

sem_wait(&cap);

printf("\t\tman in!\n");

delay();

printf("\t\t\tman out!\n");

sem_post(&cap);

sem_wait(&x);

mcount--;

if(mcount==0)

{sem_post(&wsem);}

sem_post(&x);

}

int main(void)

{

int i;

srandom(60);

mcount = 0;

wcount = 0;

sem_init(&x,0,1); // for sem_init, initial value is 3rd argument

sem_init(&y,0,1);

sem_init(&z,0,1);

sem_init(&wsem,0,1);

sem_init(&msem,0,1);

sem_init(&cap,0,4); // eg. cap initialized to 4

pthread_t *tid;

tid = malloc(80*sizeof(pthread_t));

// You can use your cobegin statement here, instead of pthread_create()  

// I have forgone the use of pthread barriers although I suppose they would nicely imitate the functionality of cobegin.

// This is merely to retain simplicity.

for(i=0;i<10;i++)

{

pthread_create(&tid[i],NULL,woman,NULL);

}

for(i=10;i<20;i++)

{  

pthread_create(&tid[i],NULL,man,NULL);

}

for(i=0;i<20;i++)

{  

pthread_join(tid[i],NULL);

}

return(0);

}

5 0
3 years ago
A software is made from​
andriy [413]

Answer:

Two or more languages are used for making one particular software.

5 0
3 years ago
If I make a Zoom Meeting, would you join it?
boyakko [2]

Most likely, yeah lol.

3 0
4 years ago
Read 2 more answers
In a(n) _____, the web becomes an integral part of the application, rather than just a communication channel, and systems analys
IRISSAK [1]

In an <u>Internet-based system</u>, the web becomes an integral part of the application, rather than just a communication channel, and systems analysts need new application development tools and solutions to handle the new systems.

d) Internet-based system

<u>Explanation:</u>

Web information system, or web-based information system, is a data framework that utilizes Internet web advancements to convey data and administrations, to clients or other data frameworks/applications.

It is a product framework whose primary intention is to distribute and keep up information by utilizing hypertext-based standards. In an Internet-based system, the Web turns into a fundamental piece of the application, instead of only a correspondence channel, and frameworks investigators need new application advancement instruments and solutions to handle the new systems.

7 0
3 years ago
Analog method is also known us
Andreas93 [3]

Hi there! Thank you for choosing Brainly to ask your question. I would be happy to assist you today by answering. You were a little bit unclear, but I hope this answers your question. - Analogue methods refer to all manual methods where no computers are used, but with the advent of digital computers the term analogue is also used for analogue methods of computing data. An analogue signal varies continuously, according to information, and thereby the data are represented in a continuous form.

8 0
3 years ago
Other questions:
  • Assume that the classes listed in the Java Quick Reference have been imported where appropriate.
    14·1 answer
  • If you define CSS rules on a parent control, the rules will be inherited by all of the children widgets.
    12·1 answer
  • Processing is handled by the computer’s central processing unit (cpu).​ <br> a. True <br> b. False
    6·1 answer
  • What does it mean to have liability for a company?
    6·1 answer
  • Select the correct answer. Larry finds it easy to run legacy programs and applications in a virtualized environment. How does th
    5·1 answer
  • You are a network engineer tasked with performing a site survey for a multiple-channel architecture (MCA) system in a three-stor
    11·1 answer
  • What is wrong with the following C++ code? How would you fix it? int sum; for (int i=0; i&lt;1000; ++i) sum += i; { printf("Sum
    5·1 answer
  • Small data files that are deposited on a user's hard disk when they visit a website are called _______.
    6·2 answers
  • A _____ network is where all computers are equal and each one is both data requester and data provider.
    13·1 answer
  • Select the correct word to complete the sentence
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!