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
marshall27 [118]
1 year ago
5

3.8 LAB: Read values into a list

Computers and Technology
1 answer:
Salsk061 [2.6K]1 year ago
8 0

An example of Read values into a list is:

#!/usr/bin/python

list1 = ['math', 'chemistry', 1995, 2001];

list2 = [1, 2, 3, 4, 5, 6, 7 ];

print "list1[0]: ", list1[0]

print "list2[1:5]: ", list2[1:5]

<h3>What is Python Lists?</h3>

This is known to be a list that is seen as the a most versatile in terms of datatype that are known to be available in Python.

It is one that can be written as a list of comma-separated values that is found in between square brackets.

Note that the most Important thing about a list is that all the items in a list are ones that do not require to be of the same type.

Hence Creating a list is very simple to do and it is done by putting a lot of comma-separated values in between square brackets.

Therefore, An example of Read values into a list is:

#!/usr/bin/python

list1 = ['math', 'chemistry', 1995, 2001];

list2 = [1, 2, 3, 4, 5, 6, 7 ];

print "list1[0]: ", list1[0]

print "list2[1:5]: ", list2[1:5]

Learn more about python list  from

brainly.com/question/24232863

#SPJ1

You might be interested in
add is a method that accepts two int arguments and returns their sum. Two int variables, euroSales and asiaSales, have already b
Oduvanchick [21]

Answer:

// here is code in Java.

// package

import java.util.*;

// class definition

class Main

{

   // method that return sum of two sale value

   public static int Add(int euroSales,int asiaSales)

   {

       // return the sum

       return euroSales+asiaSales;

   }

   //main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // variables

       int euroSales=100;

       int asiaSales=150;

       int eurasiaSales;

        // call the function

       eurasiaSales=Add(euroSales,asiaSales);

        // print the sum

       System.out.println("total sale is:"+eurasiaSales);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Declare and initialize two variables "euroSales=100" and "asiaSales=150". Declare another variable eurasiaSales. Call the method Add() with euroSales and asiaSales as parameter. This method will add both the value and return the sum.This sum will be assigned to variable eurasiaSales.Then print the sum.

Output:

total sale is:250  

8 0
3 years ago
You can make a table in presentation software?<br> A. <br> FALSE<br> B. <br> TRUE
Serggg [28]
[B] True.

In something like Microsoft Publisher, you are able to go to Insert -> Table, and specify the dimensions for the table you want.
8 0
3 years ago
User 2.0 is most likely to Multiple Choice passively read and search for content. depend on content creators and avoid expressin
Ahat [919]

User 2.0 is most likely to: use the Internet for social connection.

<h3>What is User 2.0?</h3>

User 2.0 which is an aspect of Web 2.0 defines the latest form of the internet that allows users to interact with each other. This form of the internet is easy to use and requires participation by users.

So, a possible feature of User 2.0 will be the ability to use the internet for socialization.

Learn more about User 2.0 here:

brainly.com/question/3913924

5 0
2 years ago
What type of program would you use to create a personal budget?
ira [324]

Answer:

using Excel is the easiest way to create and use a budget, based on the formulas you can create to have the budget do the work for you, instead of vice versaExplanation:

6 0
2 years ago
How to connect to the internet through another computer?
Yuri [45]
You go to settings , go to wifi, click on your wifi server, type in password, and your in! or if you mean like going on google, you just click an icon named google, Yahoo, msn, ect...
6 0
3 years ago
Other questions:
  • _ is a model of computing in which computer processing, storage, software, and other services are provided as a shared pool of v
    10·1 answer
  • The camera on a phone or laptop can be used to track a user's eye movements. Which of these is NOT one of the possible applicati
    13·1 answer
  • Which of the actions below will not create more room on your hard drive?
    11·1 answer
  • Which kind of photography takes attractive photos of products to make them stand out?
    12·1 answer
  • Write a java program that would request user name, id number, and state the time the user has reported at work.​
    12·1 answer
  • What are some other features of sending attachments in Outlook 2016? Check all that apply.
    9·2 answers
  • I was killed <br><br> යඞ <br><br> what do i do
    10·1 answer
  • HELP PLX ITS PYTHON BTW!!!
    8·1 answer
  • explain why you can determine machine epsilon on a computer using IEEE double precision and the IEEE Rounding to Nearest Rule by
    7·1 answer
  • A researcher is interested in learning more about the different kinds of plants growing in different areas of the state she live
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!