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]
3 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]3 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
Kevin is a DJ and has a passion for creating and modifying audio tracks. Which application software facilitates him in his passi
stiv31 [10]
B. Multimedia software
5 0
3 years ago
An “evil twin” in the context of computer security is: a) A virus-laden attachment that looks just like a sincere attachment b)
aleksandr82 [10.1K]

Answer:

A

Explanation:

3 0
3 years ago
Run-time parameters passed to a function allow you to use different values each time the function is called.
stich3 [128]

Answer:

True

Explanation:

Run-time parameters passed to a function allow you to use different values each time the function is called. Let us consider an example:

int add(int a,int b){

   return a+b;

}

Now we can execute the same function with different parameters at runtime:

add(3,4) returns 7.

add(1,2) return 3.

add (10,1) return 11.

During each invocation , the formal function parameters are substituted by actual runtime values and the function code is executed.

8 0
3 years ago
Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive.
zysi [14]
Procedure SumEvenOdd(stdin: array [0..100] of integer)
var
   i, sum_even, sum_odd: integer;

begin
   for i := 0 to 100 do begin
       if stdin[i] < 0 then
           break;
       if stdin[i] mod 2 = 0 then //even number
          sum_even := sum_even +  stdin[i]
       else 
          sum_odd := sum_odd +  stdin[i]; 

       ShowMessage('sum of even is ' + IntToStr(sum_even) + ' ' + 'sum of odd                                  is' + IntToStr(sum_odd) ) ;
   end; 

end
5 0
3 years ago
Hello! I hope you have a great day! Good things will come your way.
Ad libitum [116K]

Answer:

<h2>thanks </h2><h2>may god bless you </h2>
5 0
3 years ago
Other questions:
  • The Internet may best be compared to a/an
    8·1 answer
  • Which of these might be an example of an advertiser's target group?
    6·2 answers
  • What does Data storage enable a browser to do
    5·1 answer
  • Identify a characteristic of electronic meeting systems.
    10·1 answer
  • How do you insert a table by using standard toolbar?​
    13·1 answer
  • What is a common translator?​
    9·1 answer
  • This feature automatically creates tables of contents.
    5·1 answer
  • The causes of making computer virus​
    12·2 answers
  • 3) The director tells you to truck left, you must:
    10·1 answer
  • which of the following commands can be used to display any email messages awaiting delivery alongside the reason that they were
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!