Computer Science, asked by ashreya1906, 2 months ago

How many times is the word ‘ADITYA’ printed in the following statements?

S='RATHEESH BARATHI'

for ch in S[3:10]:

print(‘ADITYA’)

Answers

Answered by jai696
3

\huge\red{\mid{\fbox{\tt{ANSWER}}\mid}}

The word will be printed 7 times.

\huge\blue{\mid{\fbox{\tt{Explanation}}\mid}}

S[3:10] is a slice of 7 characters so the loop will run 7 times.

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions