Quiz on Python Slicing
Slicing is one of the best features provided by python. Without wasting any more time let’s check our expertise in slicing concepts. Let’s move ahead and attempt the quiz. All the best!
0 of 15 Questions completed Questions: You have already completed the quiz before. Hence you can not start it again. Quiz is loading… You must sign in or sign up to start the quiz. You must first complete the following: 0 of 15 Questions answered correctly Your time: Time has elapsed You have reached 0 of 0 point(s), (0) Earned Point(s): 0 of 0, (0) What does the slice() object return? Which of the following allows the slice operator to function on them? How many parameters can be given to the slice operator? How many optional parameters do we have in the slice operator? Which of the following lies at the root of slice() implementation? What will be the output of the code given below? # Code snippet starts org = ‘QuizOrbit’ print(org[-1:-6:-1]) # Code snippet ends Find the output of the code given below? # Code snippet starts val = (23,67,56,90,32) print(val[-4:-1:3]) # Code snippet ends Find the output of the code given below? # Code snippet starts val = (‘Indore’,’Pune’,’Goa’,’Delhi’) print(val[-8:-3]) # Code snippet ends What will be the output of the code given below? # Code snippet starts obj = slice(2,5,2) org = ‘QuizOrbit’ print(org[obj]) # Code snippet ends What will be the output of the code given below? # Code snippet starts obj = slice(-10,-1,6) org = ‘You are at QuizOrbit’ print(org[obj]) # Code snippet ends Find the output of the code given below? # Code snippet starts org = ‘QuizOrbit’ print(org[::-1]) # Code snippet ends What will be the output of the code given below? # Code snippet starts val = list(slice(5,3,0)) print(val[0]) # Code snippet ends What will be the output of the code given below? # Code snippet starts org = ‘QuizOrbit’ result = slice(org) print(result) # Code snippet ends What will be the output of the following code? # Code snippet starts org = ‘QuizOrbit’ n = len(org) res = [] i = 0 while(n>0): res.append(org[i:n]) n-=2 i+=1 print(len(res)) # Code snippet ends Find the output of the code given below? # Code snippet starts org = ‘QuizOrbit’ n = len(org) res = [] i = 0 while(n>0): res.append(org[i:n]) n-=2 i+=1 print(res[2]) # Code snippet ends Quiz Summary
Information
Results
Results
0 Essay(s) Pending (Possible Point(s): 0) Categories
1. Question
2. Question
3. Question
4. Question
5. Question
6. Question
7. Question
8. Question
9. Question
10. Question
11. Question
12. Question
13. Question
14. Question
15. Question
Summary
We hope you might have enjoyed this quiz and understood more about slicing in Python. We have 3 major parameters going into slicing. But be very cautious to avoid any type of index overflow. Keep learning and practicing with the quizzes. Happy Learning!

Slice operator all the three parameters are optional
Good!
Super website for practice and quiz
good
Please can any one explain question 5