Class - XI
Final exam important questions of computer science
1. Which of the following functions is used to display the length of a string?
a. Length() b. len()
c.size() d. count()
2. The operator is used to repeat a string for a specified number of times.
a. + b. * c. / d. #
3. Which of the following is not a valid identifier?
a. Mybook b. @book c. _book d. book23
4. A uses square brackets for comma-separated values in Python.
a. List b. String c. Tuple d. Dictionary
5. An entry in a dictionary consists of a and its associated .
a. Index,element b. key,value c. key, element d. index,value
6. The Function will return None, is a key is not found in the collection.
a. Keys() b. key() c. get() d. grtkey()
7. Study the following statement: >>>”a”+”bc” What will be the output of this statement?
a. a+bc b. abc c. ab+c d. a
8. To generate random floating point numbers, the function is used from the random module.
a. Randrange() b. random() c. randint() d. All of these
9. You can check that a little icon is present in the web address bar to see if a site is safe.
a. Cross b. Lock c. Key d. pointer
10. include being aware of the risks that occur with your online activities and implementing a few measures to prevent or eliminate these risks.
a. Cybercrime b. Cybersafety c. cyber world d. cyberEthics
11. means that only the authorized users get access to sensitive and confidential data.
a. confidentiality b. identity c. authentification d. encryption
12. __________refers to the rules and regulation that are used to restrict access to a system or to physical or virtual resources.
Q-2 Fill in the blanks.
1. A __________is used to explore the internet, which serves as a bridge between a user and the internet.
2. While browsing , Cookies and website data are saved but they are removed when you quit_______
Mode.
3. The pre-defined functions in python are also called_________ .
4. The ________ function rounds off the value to the next largest integer.
5. The dictionary is a _________ type of data type.
6. The keys of dictionary data type must be ________ type.
7. A list within a list is called a ________list.
8. An empty list can be created by using the ________ Function.
9. First index of a string in python is __________ .
10. A _________is used as a slicing operator.
Q-3 Short Question Answer
Q -1 and Q -2 are ASSERTION AND REASONING based questions. (A) Both (A) and (R) are true and (R) is the correct explanation of (A) (B) Both (A) and (R) are true but (R) is not the correct explanation of (A) (C) (A) is true, but (R) is false (D) (A) is false, but (R) is true
1. Assertion (A): The pow() function in Python can be used to calculate the square root of a number Reasoning (R): The pow() function can raise a number to a fractional power, which can be used to calculate square roots.
2. Assertion (A): Python modules are stored in files with a “.py” extension, and they allow you to logically organize your Python code Reasoning (R): The “.py” extension is commonly used for Python code files, and modules provide a way to organize code by grouping related functions, classes, and variables together.
3. What is difference between the sort() and sorted() functions?
4. Define dictionary with an example.
5. What do you mean by module?
6. What is incognito browsing?
7. What is the purpose of len() function?
Q-4 Answer the following.
1. What are the different type of operations that you can perform on a string?
2. What is the index of the first character of a string stored in memory?
3. Write a python program using built-in function to sort.
4. What is nested Loop?
5. What is different between the list, tuple, dictionary?
6. How to renaming a module in python?
7. Write a program that generates only 6-digit number.
Q-5 Long Question Answer.
1. How many type of numeric literals are supported by Python?
2. What are the different ways to create a multiple string literals?
3. What are Literals in python? Explain the different types of literals?
4. Write a Program to calculate area of triangle , obtain height and base from the user.
5. Write a program to input two values and interchange these values using the third variable.
6. Explain Tuples with example.
7. Explain string operation with example.