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
Which devices are managed through device management?
Ratling [72]
Answer:
computers and Mobile phones ( including game consoles and tablets) are managed through device management
Explanation:
Device management includes a type of security software used to monitor,secure and manage systems such as mobile phones computer laptops and desktops, Tablets and smart televisions as well as Game consoles. It as well involves the management,operation and maintenance of the physical aspect of the systems from external threats/intruders
Anti virus software is an example of a device management software used to protect systems from malware, by detecting and removing them and also by preventing them.
Firewall is a complete device management tool because it detects and prevents intruders and virus from penetrating the system software
7 0
2 years ago
Write a program that accepts an integer value called multiplier as user input. Create an array of integers with ARRAY_SIZE eleme
Tasya [4]

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

void PrintForward(int myarray[], int size){

   for(int i = 0; i<size;i++){        cout<<myarray[i]<<" ";    }

}

void PrintBackward(int myarray[], int size){

   for(int i = size-1; i>=0;i--){        cout<<myarray[i]<<" ";    }

}

int main(){

   const int ARRAY_SIZE = 12;

   int multiplier;

   cout<<"Multiplier: ";

   cin>>multiplier;

   int myarray [ARRAY_SIZE];

   for(int i = 0; i<ARRAY_SIZE;i++){        myarray[i] = i * multiplier;    }

   PrintForward(myarray,ARRAY_SIZE);

   PrintBackward(myarray,ARRAY_SIZE);

   return 0;}

Explanation:

The PrintForward function begins here

void PrintForward(int myarray[], int size){

This iterates through the array in ascending order and print each array element

<em>    for(int i = 0; i<size;i++){        cout<<myarray[i]<<" ";    }</em>

}

The PrintBackward function begins here

void PrintBackward(int myarray[], int size){

This iterates through the array in descending order and print each array element

<em>    for(int i = size-1; i>=0;i--){        cout<<myarray[i]<<" ";    }</em>

}

The main begins here

int main(){

This declares and initializes the array size

   const int ARRAY_SIZE = 12;

This declares the multiplier as an integer

   int multiplier;

This gets input for the multiplier

   cout<<"Multiplier: ";    cin>>multiplier;

This declares the array

   int myarray [ARRAY_SIZE];

This iterates through the array and populate the array by i * multiplier

<em>    for(int i = 0; i<ARRAY_SIZE;i++){        myarray[i] = i * multiplier;    }</em>

This calls the PrintForward method

   PrintForward(myarray,ARRAY_SIZE);

This calls the PrintBackward method

   PrintBackward(myarray,ARRAY_SIZE);

   return 0;}

6 0
3 years ago
Google is an example of a(n): Web site.search engine.search directory. subject directory
lora16 [44]
Google is famously known as a search engine and it is being used around the globe. Aside from being a search engine, it also offers other services such as productivity software or google docs, e-mail services like Gmail, cloud storage or the google drive and it also offers social networking services through google plus. Google also has some desktop application for free of use such as google chrome, picasa and instant messaging like hangouts. Their mission statement as for being the most used search engine is "to organize the world's information and make it universally accessible and useful".
6 0
3 years ago
Write a program that calculates the amount of money in a savings account that earns a guaranteed yearly interest rate. The progr
White raven [17]

Solution :

# Reading principle amount from user

$\text{accountPresentValue}$ = eval($\text{inpu}t("$Enter principle amount: "))

# Reading time duration in number of year from user

years = eval(input("Enter time duration in number of year: "))

# Reading interest rate from user

annualInterestRate = eval(input("Interest rate: "))

# calculating futureValue using user input data

futureValue = accountPresentValue * (1 + annualInterestRate / 100) ** years

# printing calculated futureValue to console

print("Final balance =",futureValue)

7 0
2 years ago
CONVERT .0001 KILOMETERS TO MILLIMETERS
Trava [24]

Answer:

The answer to this question is given below in the explanation section

Explanation:

As we know that

1 km = 1000000 mm

So, 0.001 * 1000000 =  100

the answer is 100 millimeters.

7 0
3 years ago
Other questions:
  • How do you enlarge your screen if there is no control panel? Need desperate help!
    15·1 answer
  • On a vehicle with a manual transmission, a frequent mistake is shifting
    11·1 answer
  • Which of the following is the primary medium for beach erosion?
    12·1 answer
  • Write a paragraph on the following topic.
    14·1 answer
  • 60 POINTS!! WILL MARK BRAINLEST!!
    11·1 answer
  • Which one should i get?
    5·2 answers
  • Candy Kane Cosmetics (CKC) produces Leslie Perfume, which requires chemicals and labor. Two production processes are available:
    14·1 answer
  • Help please i will give Brainliest
    7·1 answer
  • How is information sent across the internet binary
    5·1 answer
  • the 4gl languages that enable nonprogrammers to use certain easily understood commands to search and generate reports from a dat
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!