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
Nana76 [90]
2 years ago
5

The function below takes two parameters: a string parameter: csv_string and an integer index. This string parameter will hold a

comma-separated collection of integers: ‘111, 22,3333,4’. Complete the function to return the indexth value (counting from zero) from the comma-separated values as an integer. For example, your code should return 3333 (not ‘3333 *) if the example string is provided with an index value of 2. Hints you should consider using the split() method and the int() function. print.py 1 – def get_nth_int_from_CSV(CSV_string, index): Show transcribed image text The function below takes two parameters: a string parameter: csv_string and an integer index. This string parameter will hold a comma-separated collection of integers: ‘111, 22,3333,4’. Complete the function to return the indexth value (counting from zero) from the comma-separated values as an integer. For example, your code should return 3333 (not ‘3333 *) if the example string is provided with an index value of 2. Hints you should consider using the split() method and the int() function. print.py 1 – def get_nth_int_from_CSV(CSV_string, index):
Computers and Technology
1 answer:
irakobra [83]2 years ago
3 0

Answer:

The complete function is as follows:

def get_nth_int_from_CSV(CSV_string, index):

   splitstring = CSV_string.split(",")

   print(int(splitstring[index]))

Explanation:

This defines the function

def get_nth_int_from_CSV(CSV_string, index):

This splits the string by comma (,)

   splitstring = CSV_string.split(",")

This gets the string at the index position, converts it to an integer and print the converted integer

   print(int(splitstring[index]))

You might be interested in
How long will it take to transfer 1GB data on USB 2.0, on USB 3.0
cupoosta [38]

Answer:

Have a great day, Here is the answer to your question:

It will take around 18 seconds

Explanation:

So in principle 1GB of data to be uploaded running at peak speed is suggested to take around 18 seconds but in fact, DCD test results show USB 2.0 takes 3 minutes 18 seconds to complete a 1GB switch. Whereas USB 3.0 can accommodate up to 5gbps of data transferred-more than 10 times faster than its predecessor.

8 0
3 years ago
Live preview is available on a touch screen T/F
TEA [102]
<span>It is false that live preview is available on a touch screen. Life preview refers to cameras mostly, and to the fact that its display screen can be used as a viewfinder. Viewfinder is what you look through when you are using a camera to take a photo, or to focus on something. So, no, touch screen devices do not have this feature available, only the "old-school" cameras do.</span>
3 0
3 years ago
Write an if-else statement that displays 'Speed is normal' if the speed variable is within the range of 24 to 56. If the speed v
kari74 [83]

Answer:

import java.util.Scanner;

public class Speed{

int speed;

public Speed(int speed){

this.speed = speed;

}

public void checkSpeed(){

if(speed >= 24 || speed <= 56){

System.out.println("Speed is normal");

}

else

System.out.println("Speed is abnormal");

}

public static void main(String...args){

Scanner input = new Scanner(System.in);

int userSpeed = 0;

System.out.println("Enter a speed: ");

userSpeed = input.nextInt();

Speed obj1 = new Speed(userSpeed)

obj1.checkSpeed();

}

Explanation:

4 0
3 years ago
true or false if you type too much text on a powerpoint slide, the additional text is added to a second slide
Nady [450]
True I've had it happen alot
3 0
3 years ago
Read 2 more answers
To include calculated fields in queries, enter a name for the calculated field, a(n) ____, and then the expression in one of the
Oliga [24]

Answer:

Colon(:) is the correct answer.

Explanation:

The colon(:) is used to contain those fields which is calculated in the queries. In other words, the colon is used to insert the name for that field which is calculated then, the user uses the colon(:) and after that, he uses the expression in the columns or the field row. So, That's why the following option is true.

3 0
3 years ago
Other questions:
  • Using a windows computer, to expand a branch of the folder tree you would _____.
    14·1 answer
  • The Active Directory Users and Computers tool can be used to:______.
    11·1 answer
  • According to the Bureau of Labor Statistics, how
    14·1 answer
  • File-sharing programs such as Napster, Kazaa, and iMesh make it possible for individuals to exchange music files over the Intern
    7·1 answer
  • For off campus work study positions, students should contact the
    6·1 answer
  • The sample remote access policy document from the hospital that you reviewed in the lab showed that the Remote Access Domain is
    15·2 answers
  • How can photography allow us to view the world around us in different ways?
    5·2 answers
  • You are a domain administrator for a large domain. Recently, you have been asked to make changes to some of the permissions rela
    11·1 answer
  • Determine whether or not the following pairs of predicates are unifiable. If they are, give the most-general unifier and show th
    13·1 answer
  • A timer is set after each frame is sent before waiting an ACK for that frame, how long does the timer take to be expired?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!