Computer Science, asked by anuguptavansh20, 7 hours ago

Rectify the statement: 1. Count() is used to find the total of the selected range.







PLS HELP ME FASTTT​

Answers

Answered by Equestriadash
3

[The answer is as per the view that the question is referring to the count() function present in Python.]

Given statement:

\tt count() is used to find the total of the selected range.

Corrected statement:

\tt count() is used to find the number of occurrences of the specified argument within the data.

For example,

>>>\ \tt n\ =\ 'Vanessa'\\>>>\ n.count('s')\\2

Here, we're trying to find the number of times 's' occurs in the string 'Vanessa' that has been assigned to n. It returns 2 as 's' occurs twice in 'Vanessa'.

Another example,

>>>\ \tt l\ =\ [24,\ 12,\ 34,\ 57,\ 89,\ 12,\ 12,\ 34]\\>>> l.count(12)\\3

We're trying to check how many times the element 12 occurs in the list l. It returns 3 as 12 occurs thrice in l.


Equestriadash: Thanks for the Brainliest! ^_^"
Similar questions