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
balu736 [363]
3 years ago
15

How are Python dictionaries different from Python lists? Python lists can store strings and dictionaries can only store words Py

thon dictionaries are a collection and lists are not a collection Python lists are indexed using integers and dictionaries can use strings as indexes
Computers and Technology
1 answer:
Alex17521 [72]3 years ago
4 0

Answer:

Python lists are indexed using integers and dictionaries can use strings as indexes

Explanation:

Python lists can store strings and dictionaries can only store words False

Words are actually strings. This is false because Python dictionaries store strings.

Python dictionaries are a collection and lists are not a collection False

This is false because in Python lists are an ordered collection of items

Python lists are indexed using integers and dictionaries can use strings as indexes True

Python lists are an ordered collection of items. Indexing means referring to the position of the element and this is possible using integer for Python lists and strings for Python dictionaries.

You might be interested in
How do you change a Word document to an .html file? Save it as a Web page. Save it as a plain text document. Copy it in rich tex
Flura [38]
Save it as a web page

6 0
3 years ago
Select the correct answer.
VARVARA [1.3K]

Answer:

D

Explanation:

It is D

Select the correct answer.

Identify the correct CSS syntax to link an external style sheet.

6 0
3 years ago
How to find the largest number in an array java?
melomori [17]

Answer:

<em>One of the ways is to sort the array, then print the last element of the sorted array.</em>

<em>In Java, you can make use of the following code</em>

import java.util.Scanner;

public class Assignment{

public static void main(String [] args)

{

int n;

Scanner input = new Scanner(System.in);

System.out.print("Array Length: ");

n = input.nextInt();

int [] myarray = new int[n];

System.out.print("Input Array: ");

for(int i=0;i<n;i++)

{

           myarray[i]=input.nextInt();

}

int temp;  

for (int i = 0; i < n; i++)  

       {  

           for (int j = i + 1; j < n; j++)  

           {  

               if (myarray[i] > myarray[j])  

               {  

                   temp = myarray[i];  

                   myarray[i] = myarray[j];  

                   myarray[j] = temp;  

               }  

           }  

       }  

           System.out.println(myarray[n - 1]);

       }

}

Explanation:

This line declares n as length of array

int n;

Scanner input = new Scanner(System.in);

This line prompts user length of array

System.out.print("Array Length: ");

This line gets the user input

n = input.nextInt();

An empty array pf length arrowed

int [] myarray = new int[n];

This line prompts user array elements

System.out.print("Input Array: ");

The following iteration gets array element from user

<em>for(int i=0;i<n;i++)</em>

<em>{</em>

<em>            myarray[i]=input.nextInt();</em>

<em>}</em>

This line declares a temporary variable temp

int temp;

<em>This iterations iterates through the elements of rge array</em>

<em>for (int i = 0; i < n; i++)   </em>

<em>        {  </em>

<em>            for (int j = i + 1; j < n; j++)   </em>

<em>            {  </em>

The following if condition checks for the larger of two variables and swap their position

<em>                if (myarray[i] > myarray[j])   </em>

<em>                {  </em>

<em>                    temp = myarray[i];  </em>

<em>                    myarray[i] = myarray[j];  </em>

<em>                    myarray[j] = temp;  </em>

<em>                }  </em>

           }  

       }  

This line prints the largest number of the array

           System.out.println(myarray[n - 1]);

5 0
3 years ago
Write a program that prompts the user to input the decimal value of a double and outputs the number rounded to the nearest integ
KengaRu [80]

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() {

double n;

cout<<"Enter a decimal number: ";

cin>>n;

int Round= floor((n- floor(n))*2);

if(Round==0)

{

n= floor(n);

}

else n= ceil(n);

cout<<n;

return 0;

}

5 0
4 years ago
How to be professional in graphic design without CAD?
Mama L [17]

Answer:

There are two types of image processing software, raster-based, and vector-based. The CAD and the CAID are just the two vectors based software. However, there is much other software like Adobe Illustrator, Microsoft Publisher, Corel Draw, Photoshop on which you can embark upon, and become an equally good Graphics designer. And hence, you can certainly become a Graphics designer with the CAD experience, however, you should keep in mind that all the great Graphic designers use CAD and CAID. And hence, you should use it sometimes certainly in the future.

Explanation:

Please check the answer section.

4 0
3 years ago
Other questions:
  • _ are typically comprised of a mix of _ and _
    11·2 answers
  • What is media consumption ?
    12·2 answers
  • Create 3–5 questions about your data that can be answered by sorting and filtering the database.
    8·1 answer
  • Select the correct answer.
    10·2 answers
  • 9.2 code practice edhesive
    14·1 answer
  • Sound can be converted from the electrical energy inside a computer into the mechanical energy of soundwaves in air by using
    9·1 answer
  • An example of hardware is a(n) _____.
    9·2 answers
  • Using your own words, explain how third-party cookies are created. Suppose you are an ad-serving company, and you maintain a log
    9·1 answer
  • Question 1 of 10 Which type of information systems personnel are involved in organizing information so that users can access it
    7·1 answer
  • What should you try first if your antivirus software does not detect and remove a virus?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!