This assignment contains various questions focusing on how to create a series with different options. It is an important topic for Class XII CBSE Boards Students and through this assignment they will learn about the various concepts associated with the Creation of Series easily.
Question : Name any three Python sequences?
Answer : Sequences :
- Sequences allow you to store multiple elements or values in an organized and efficient fashion. In Python, the sequence index starts at 0 and end to size-1.
- So, if ‘s’ is the sequence name then, the first element is s[0] and the second element is s[1]. If the sequence s has n items, the last item is s[n-1].
- Python supports six different types of sequences. They are : strings, bytes, lists, tuples, bytearrays, buffers and range objects.
Question : Write a code to create Series object using Python Sequence [50,70,90,80].
Answer :
Series Creation Using List
Question : Write a code to create Series object using Python Sequence (40,70,50,90).
Answer :
Create Series using Tuple
Question : Write a code to create Series object using individual characters ‘S’,’t’,’u’,’d’,’y’.
Answer :
Create Series Using String
Question : Write a code to create Series object using a string “Study Trigger”.
Answer :
Create Series
Question : Write a code to create Series object using the following words: “Study”,”Trigger”,”is”,”the”,”best”,”place”,”to”,”learn”,”Python”.
Answer :
Create Series
Question : Write a code to create Series object using an ndarray that has 5 elements in the range 14 to 54.
Answer :
Create Series using ndarray
Question : Write a code to create Series object using ndarray that is created by tiling a list [7,9] by twice.
Answer :
Create Series using tile
Question : Write a code to create Series object using a dictionary that stores mobile name with their prices.
Answer:
Create Series Using Dictionary
Question : Write a code to create a Series object that stores the scholarship of Rs.5000 for the each sections of class 12.
Answer :
Create Series Using Dictionary
or
You can also write the following code for the above question :
Create Series for Scalar Item
Question : Total number of medals to be won is 150 in the Inter School games held every alternate year. Write code to create a series object that stores these medals for games to be held in the decade 2000-2013.
Answer :
Create Series where Index of Series Generated by random()
Question : A Python list namely Products stores the product names (‘Mobile’,’Charger’,’Watch’, ’Earbuds’). Another list stores the price of these products i.e. (50000,5000,7500,2500). Write a code to create a Series Object that stores the price as value and product name as index.
Answer:
Create Series using two lists
Question : Do the above question with the help of dictionary.
Answer:
Create Series using Dictionary
Question : A Python list namely Streams stores the streams (‘Science’,’Commerce’,’Humanities’). Another list stores the number of students of these streams i.e. (60,75,45). Write a code to create a Series Object that stores the number of students as value and streams as index.
Answer:
Practice more questions based on CBSE pattern with the following articles :
PYTHON SERIES PRACTICE QUESTIONS WITH SOLUTIONS (PART-II)
PYTHON SERIES PRACTICE QUESTIONS WITH SOLUTIONS (PART-III)
1 comment
Very informative assignment. Cleared my all doubts related to series creation.