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
pantera1 [17]
4 years ago
9

Which is a correctly formatted Python tuple?

Computers and Technology
1 answer:
rjkz [21]4 years ago
7 0

Answer:

(12, "circle”, “square")  is the correct answer.

Explanation:

The following answer is true because the following answer is in the correct format. The tuple is the data type of the Python Programming language which is defined inside the parentheses "()" and it is an immutable type that means its elements is not changed after once the element is inserted in the tuple. Tiple is also defined by the parentheses "()" or by the predefined function tuple().

You might be interested in
A(n ____________ is considered a named collection of bytes having persistent or lasting storage.
kykrilka [37]
A(n) file is considered a named collection of bytes having persistent or lasting storage.
6 0
3 years ago
Write the following function without using the C++ string class or any functions in the standard library, including strlen(). Yo
dolphi86 [110]

Answer:

The function in C++ is as follows

int chkInd(string str1, string str2){    

int lenstr1=0;

while(str1[lenstr1] != '\0'){  lenstr1++;  }

int index = 0; int retIndex=0;

for(int i=lenstr1-1;i>=0; i--){

   while (str2[index] != '\0'){

       if (str1[i] == str2[index]){

           retIndex=1;

           break;         }

       else{   retIndex=0;      }

  index++;    }

  if (retIndex == 0){   return i;   }else{return -1;}}

}

Explanation:

This defines the function

int chkInd(string str1, string str2){    

First, the length of str1 is initialized to 0

int lenstr1=0;

The following loop then calculates the length of str1

while(str1[lenstr1] != '\0'){  lenstr1++;  }

This initializes the current index and the returned index to 0

int index = 0; int retIndex=0;

This iterates through str1

for(int i=lenstr1-1;i>=0; i--){

This loop is repeated while there are characters in str2

   while (str2[index] != '\0'){

If current element of str2 and str1 are the same

       if (str1[i] == str2[index]){

Set the returned index to 1

           retIndex=1;

Then exit the loop

           break;         }

If otherwise, set the returned index to 0

       else{   retIndex=0;      }

Increase index by 1

  index++;    }

This returns the calculated returned index; if no matching is found, it returns -1

  if (retIndex == 0){   return i;   }else{return -1;}}

}

4 0
3 years ago
What is the role of the computer in banking system?
Daniel [21]

Answer: In banks, computers are used for keeping account information of customer accounts. Banks use technology to carry out payments effectively and successfully. Computers help bankers keep a record of and verify financial records much quicker. Hope this is helpful.

3 0
2 years ago
Which type of document should Omar print?
Zinaida [17]

Well it depends on the topic he is doing. if it is a list then a plain doc with a list of numbers. if he is writing a letter then he should use the letter template.

7 0
3 years ago
Read 2 more answers
Write the definition of a function, is_reverse, whose two parameters are arrays of integers of equal size. The function returns
Alisiya [41]

Answer:

def is_reverse(lst1, lst2):

   lst2 = lst2[::-1]

   if lst1 == lst2:

       return True

   else:

       return False

Explanation:

Create a function called is_reverse that takes two parameters, lst1 and lst2

Reverse the second list using slicing

Check if the first list and the second list are equal to each other. If they are, return True. Otherwise, return False

4 0
3 years ago
Other questions:
  • Which best describes the difference between stocks and bonds ?
    8·2 answers
  • The most popular input device of a computer is a(n) ____.
    6·1 answer
  • What is the definition of legal intrusion
    14·1 answer
  • How do I give extra points on Brainly
    6·2 answers
  • Ted reads a sentence: The man said that it would take 10 to 12 days for a reply. He believes the hyphen symbol can replace the w
    11·1 answer
  • Which of the following grinding methods is best suited to a shorter cylindrical workpiece?
    8·1 answer
  • What does DOS stand for?
    15·1 answer
  • Which of the following is not an example of debugging? looking for errors in programming code. fixing misspelled commands in pro
    13·1 answer
  • Explain the applications software that you use everyday
    5·1 answer
  • What is the importance of test documentation?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!