Computer Science Class 11 NCERT Solutions

Computer Science Class 11 NCERT Solutions – The NCERT textbooks for computer science class 11 typically include questions and answers at the end of each chapter or section. These questions and answers are designed to test the students’ understanding of the concepts covered in the chapter. They range from simple factual questions to more complex problem-solving questions and may include multiple-choice questions, fill-in-the-blank questions, true or false questions, and short-answer questions. students can develop their critical thinking and problem-solving skills with the help of NCERT texbook Questions and Answers.

Computer Science Class 11 NCERT Solutions

Computer Systems and Organisation

Computational Thinking and Programming – 1

Society, Law and Ethics

Computer Science Class 11 MCQ

Computer Science Class 11 MCQ – Multiple Choice Questions (MCQs) are a popular and effective way of testing a student’s understanding of a subject, and they are widely used in various exams, including class 11 computer science exams. These MCQs are designed to cover the important topics and concepts in the subject, and they are usually divided into different NCERT chapters, with the questions being taken topic-wise from each chapter. This MCQs are develped by the teachers, they make sure that the questions cover all of the important aspects of the subject. The questions are designed to test a student’s comprehension of the subject and ability to apply it in real-world situations.

Computer Science Class 11 MCQ

Computer Systems and Organisation

Computational Thinking and Programming – 1

Society, Law and Ethics

Computer Science Class 11 Notes

Computer Science Class 11 Notes cover all the units in a comprehensive and concise manner, making it easier for students to learn and secure full marks with less effort and time. The topics covered include Unit 1 Computer System Organization, Unit 2 Computational Thinking and Programming, and Unit 3 Society Law and Ethics. The language used in these notes is simple and easy to understand, allowing for better grasp of the concepts.

The revision notes for Class 11 Computer Science are comprehensive study materials based on the latest syllabus and NCERT textbook. They are designed to help students excel in their exams by providing chapter-wise summaries, important questions, and answers.

These notes are created by experienced experts to ensure the most relevant and up-to-date information is included. These revision notes provide a great opportunity for students to revise and reinforce their understanding of the subject before their exams.

Computer Science Class 11 Notes

Computer Systems and Organisation

Computational Thinking and Programming – 1

Society, Law and Ethics

Computer Science Class 11 Practical

Computer Science Class 11 Practical – Practical work is an important aspect of learning computer science. It allows students to apply theoretical concepts to real-world problems and develop hands-on experience. In a computer science class 11, practical work may include programming assignments and projects that use various programming languages and tools.

Computer Science Class 11 Practical

Q. Input a welcome message and display it
print("Welcome to the program")

Output

Welcome to the program

Q. Input two numbers and display the larger / smaller number
num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))
print("Larger number: ", max(num1, num2))
print("Smaller number: ", min(num1, num2))

Output

Enter first number: 55
Enter second number: 33
Larger number: 55
Smaller number: 33

Q. Input three numbers and display the largest / smallest number
num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))
num3 = int(input("Enter third number: "))
print("Largest number: ", max(num1, num2, num3))
print("Smallest number: ", min(num1, num2, num3))

Output

Enter first number: 52
Enter second number: 66
Enter third number: 44
Largest number: 66
Smallest number: 44

Q. Generate the following patterns using nested loop.
a) *
    **
    ***
    ****
    *****

for i in range(1, 6):
    print("*" * i)

b) 1 2 3 4 5
    1 2 3 4
    1 2 3
    1 2
    1


for i in range(5, 0, -1):
    print(" ".join([str(x) for x in range(1, i + 1)]))


c) A
    AB
    ABC
    ABCD
    ABCDE


for i in range(1, 6):
    print("".join([chr(x) for x in range(65, 65 + i)]))
Q. Write a program to input the value of x and n and print the sum of the following series:
a) 1+x+x2+x3+x4+. ..........xn

def sum_of_series(x, n):
    result = 0
    for i in range(n + 1):
        result += x**i
    return result

x = int(input("Enter the value of x: "))
n = int(input("Enter the value of n: "))
print("Sum of the series:", sum_of_series(x, n))

Output

Enter the value of x: 5
Enter the value of n: 10
Sum of the series: 12207031

b) 1-x+x2-x3+x4 .................................xn

def sum_of_series(x, n):
    result = 0
    for i in range(n + 1):
        result += (-1)**i * x**i
    return result

x = int(input("Enter the value of x: "))
n = int(input("Enter the value of n: "))
print("Sum of the series:", sum_of_series(x, n))

Output

Enter the value of x: 5
Enter the value of n: 10
Sum of the series: 8138021
Q. Determine whether a number is a perfect number, an armstrong number or a palindrome
def is_perfect(num):
    sum = 0
    for i in range(1, num):
        if num % i == 0:
            sum += i
    return sum == num

def is_armstrong(num):
    temp = num
    sum = 0
    while temp > 0:
        digit = temp % 10
        sum += digit ** 3
        temp //= 10
    return sum == num

def is_palindrome(num):
    return str(num) == str(num)[::-1]

num = int(input("Enter a number: "))
if is_perfect(num):
    print(num, "is a perfect number")
elif is_armstrong(num):
    print(num, "is an armstrong number")
elif is_palindrome(num):
    print(num, "is a palindrome")
else:
    print(num, "is none of the above")

Output

Enter a number: 66
66 is a palindrome

Q. Input a number and check if the number is a prime or composite number
def is_prime(num):
    if num > 1:
        for i in range(2, num):
            if (num % i) == 0:
                return False
        return True
    else:
        return False

num = int(input("Enter a number: "))
if is_prime(num):
    print(num, "is a prime number")
else:
    print(num, "is a composite number")

# Display the terms of a Fibonacci series
def fibonacci(n):
    fib = [0, 1]
    for i in range(2, n):
        fib.append(fib[i-1] + fib[i-2])
    return fib

n = int(input("Enter the number of terms: "))
print("Fibonacci series: ", fibonacci(n))

Output

Enter a number: 5
5 is a prime number
Enter the number of terms: 3
Fibonacci series: [0, 1, 1]

Q. Display the terms of a Fibonacci series.
def fibonacci(n):
    if n <= 0:
        return []
    elif n == 1:
        return [0]
    elif n == 2:
        return [0, 1]
    else:
        fib_list = [0, 1]
        while len(fib_list) < n:
            next_term = fib_list[-1] + fib_list[-2]
            fib_list.append(next_term)
        return fib_list

n = int(input("Enter the number of terms to display: "))
print("The terms of the Fibonacci series:", fibonacci(n))

Output

Enter the number of terms to display: 10
The terms of the Fibonacci series: [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]

Q. Compute the greatest common divisor and least common multiple of two integers.
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd(a, b)

a = int(input("Enter the first integer: "))
b = int(input("Enter the second integer: "))

gcd_value = gcd(a, b)
lcm_value = lcm(a, b)

print("The GCD of", a, "and", b, "is", gcd_value)
print("The LCM of", a, "and", b, "is", lcm_value)

Output

Enter the first integer: 18
Enter the second integer: 61
The GCD of 18 and 61 is 1
The LCM of 18 and 61 is 1098

Q. Count and display the number of vowels, consonants, uppercase, lowercase characters in string.
def count_characters(string):
    vowels = "AEIOUaeiou"
    consonants = "BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz"
    uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    lowercase = "abcdefghijklmnopqrstuvwxyz"

    vowel_count = 0
    consonant_count = 0
    uppercase_count = 0
    lowercase_count = 0
    for char in string:
        if char in vowels:
            vowel_count += 1
        elif char in consonants:
            consonant_count += 1
        elif char in uppercase:
            uppercase_count += 1
        elif char in lowercase:
            lowercase_count += 1

    return vowel_count, consonant_count, uppercase_count, lowercase_count

string = input("Enter a string: ")
vowel_count, consonant_count, uppercase_count, lowercase_count = count_characters(string)

print("Number of vowels:", vowel_count)
print("Number of consonants:", consonant_count)
print("Number of uppercase characters:", uppercase_count)
print("Number of lowercase characters:", lowercase_count)

Output

Enter a string: Welcome to my School
Number of vowels: 6
Number of consonants: 11
Number of uppercase characters: 2
Number of lowercase characters: 15

Q. Input a string and determine whether it is a palindrome or not; convert the case of characters in a string.
def is_palindrome(string):
    return string == string[::-1]

def convert_case(string):
    return string.swapcase()

string = input("Enter a string: ")

if is_palindrome(string):
    print("The string is a palindrome.")
else:
    print("The string is not a palindrome.")

converted_string = convert_case(string)
print("Converted string:", converted_string)

Output

Enter a string: MADAM
The string is a palindrome.
Converted string: madam

Q. Find the largest/smallest number in a list/tuple
def find_min_max(numbers):
    return min(numbers), max(numbers)

numbers = [int(num) for num in input("Enter a list of numbers separated by space: ").split()]

minimum, maximum = find_min_max(numbers)

print("The smallest number is:", minimum)
print("The largest number is:", maximum)

Output

Enter a list of numbers separated by space: 55 32 12
The smallest number is: 12
The largest number is: 55

Q. Input a list of numbers and swap elements at the even location with the elements at the odd location.
def swap_elements(numbers):
    for i in range(0, len(numbers) - 1, 2):
        numbers[i], numbers[i + 1] = numbers[i + 1], numbers[i]
    return numbers

numbers = [int(num) for num in input("Enter a list of numbers separated by space: ").split()]

swapped_numbers = swap_elements(numbers)

print("The list after swapping elements:", swapped_numbers)

Output

Enter a list of numbers separated by space: 55 41 63
The list after swapping elements: [41, 55, 63]

Q. Input a list/tuple of elements, search for a given element in the list/tuple.
def search_element(elements, search_item):
    if search_item in elements:
        return True
    else:
        return False

elements = [int(num) for num in input("Enter a list of elements separated by space: ").split()]

search_item = int(input("Enter the item to search for: "))

if search_element(elements, search_item):
    print("The item was found in the list/tuple.")
else:
    print("The item was not found in the list/tuple.")

Output

Enter a list of elements separated by space: 61 24 52
Enter the item to search for: 24
The item was found in the list/tuple.

Q. Input a list of numbers and find the smallest and largest number from the list.
def find_min_max(numbers):
  min_num = float('inf')
  max_num = float('-inf')
  for num in numbers:
    if num < min_num:
      min_num = num
    if num > max_num:
      max_num = num
  return (min_num, max_num)

numbers = [int(x) for x in input("Enter a list of numbers separated by space: ").split()]
min_num, max_num = find_min_max(numbers)
print("Smallest number:", min_num)
print("Largest number:", max_num)

Output

Enter a list of numbers separated by space: 63 41 75
Smallest number: 41
Largest number: 75

Q. Create a dictionary with the roll number, name and marks of n students in a class and display the names of students who have scored marks above 75.
n = int(input("Enter the number of students: "))
students = {}
for i in range(n):
    roll_number = int(input("Enter the roll number: "))
    name = input("Enter the name: ")
    marks = int(input("Enter the marks: "))
    students[roll_number] = (name, marks)

print("\nList of students who have scored marks above 75:")
for roll_number, (name, marks) in students.items():
    if marks > 75:
        print(name)

Output

Enter the number of students: 2
Enter the roll number: 1
Enter the name: Rakesh Kumar
Enter the marks: 88
Enter the roll number: 2
Enter the name: Amit Singh
Enter the marks: 58
List of students who have scored marks above 75:
Rakesh Kumar

Q. Write a program in python to find the area of Circle using If Conditions
import math

def area_of_circle(radius):
  if radius < 0:
    return "Invalid radius. Radius should be a positive number."
  else:
    area = math.pi * radius**2
    return "Area of Circle with radius {} is {}".format(radius, area)

radius = float(input("Enter the radius of the circle: "))
print(area_of_circle(radius))

Output

Enter the radius of the circle: 6
Area of Circle with radius 6.0 is 113.09733552923255

Q. Write a program to take input from the user and print reverse order
def reverse_string(s):
  return s[::-1]

string = input("Enter a string: ")
print("The reversed string is:", reverse_string(string))

Output

Enter a string: PYTHON
The reversed string is: NOHTYP

Q. Write a program to take two input from the user and concatenate the strings
def concatenate_strings(s1, s2):
  return s1 + s2

string1 = input("Enter the first string: ")
string2 = input("Enter the second string: ")
print("The concatenated string is:", concatenate_strings(string1, string2))

Output

Enter the first string: My
Enter the second string: School
The concatenated string is: MySchool

Q. Write a program to accept list from the used and sort the list
def sort_list(lst):
  return sorted(lst)

list = [int(x) for x in input("Enter a list of numbers separated by spaces: ").split()]
print("The sorted list is:", sort_list(list))

Output

Enter a list of numbers separated by spaces: 6 8 4 9 7 5
The sorted list is: [4, 5, 6, 7, 8, 9]

Q. Write a program to take input from the user and find the average of the list
def average_of_list(lst):
  return sum(lst) / len(lst)

list = [int(x) for x in input("Enter a list of numbers separated by spaces: ").split()]
print("The average of the list is:", average_of_list(list))

Output

Enter a list of numbers separated by spaces: 6 5 1 8 4 9
The average of the list is: 5.5

Q. Write a program to take input from the used and find the largest and smallest number from the List
def largest_and_smallest_in_list(lst):
  return max(lst), min(lst)

list = [int(x) for x in input("Enter a list of numbers separated by spaces: ").split()]
largest, smallest = largest_and_smallest_in_list(list)
print("The largest number in the list is:", largest)
print("The smallest number in the list is:", smallest)

Output

Enter a list of numbers separated by spaces: 6 5 7 1 5
The largest number in the list is: 7
The smallest number in the list is: 1

Computer Science Class 11 Notes
Computer Science Class 11 MCQ
Computer Science Class 11 NCERT Solutions

Best 45+ Function in Python MCQ

function in python mcq

Teachers and Examiners (CBSESkillEduction) collaborated to create the Function in Python MCQ. All the important Information are taken from the NCERT Textbook Computer Science (083) class 11.

Function in Python MCQ

1. Which of the following is the use of function in python?
a) Functions are reusable pieces of programs 
b) Functions don’t provide better modularity for your application
c) you can’t also create your own functions
d) All of the mentioned

Show Answer ⟶
a) Functions are reusable pieces of programs

2. Which keyword is used for function?
a) Fun
b) Define
c) Def 
d) Function

Show Answer ⟶
c) Def

3. What will be the output of the following Python code?
def sayHello():
print(‘Hello World!’)
sayHello()
sayHello()

a. Hello World! 
Hello World!
b. Hello World!
c. Hello World!
Hello World!
Hello World!
d. None of the above

Show Answer ⟶
a. Hello World!
Hello World!

4. In programming, the use of ___________ is one of the means to achieve modularity and reusability.
a. String
b. If-Statement
c. Lists
d. Function 

Show Answer ⟶
d. Function

Function in Python MCQ

5. __________ can be defined as a named group of instructions that accomplish a specific task when it is invoked.
a. String
b. If-Statement
c. Lists
d. Function 

Show Answer ⟶
d. Function

6. What are the advantages of function?
a. Increases readability
b. Reduces code
c. Increases reusability
d. All of the above 

Show Answer ⟶
d. All of the above

7. __________ length as the same code is not required to be written at multiple places in a program. This also makes debugging easier.
a. Increases readability
b. Reduces code 
c. Increases reusability
d. All of the above

Show Answer ⟶
b. Reduces code

8. We can define our own functions while writing the program. Such functions are called __________.
a. User defined function 
b. Predefined function
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. User defined function

9. A function defined to achieve some task as per the programmer’s requirement is called a ____________.
a. User defined function
b. Predefined function 
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Predefined function

Function in Python MCQ

10. The items enclosed in “[ ]” are called ___________ and they are optional.
a. Function
b. Parameters 
c. Values
d. None of the above

Show Answer ⟶
b. Parameters

11. Function header always ends with a _________.
a. Colon (:) 
b. Semi-Colon (;)
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Colon (:)

12. Function name should be __________.
a. Unique 
b. Repeated
c. Only keyword name can be added
d. None of the above

Show Answer ⟶
a. Unique

13. The statements outside the function indentation are not considered as _____________.
a. Not a part of the function
b. Part of the function 
c. Some time it is part of function
d. None of the above

Show Answer ⟶
b. Part of the function

14. ____________ is a value passed to the function during the function call which is received in the corresponding parameter defined in the function header.
a. Parameters
b. Arguments 
c. Values
d. None of the above

Show Answer ⟶
b. Arguments

Function in Python MCQ

15. We can use the _________ function to find the identity of the object that the argument and parameter are referring to.
a. identity()
b. id() 
c. ids()
d. None of the above

Show Answer ⟶
b. id()

16. A __________ is a value that is pre decided and assigned to the parameter when the function call does not have its corresponding argument.
a. Default Value 
b. Value
c. Null Value
d. None of the above

Show Answer ⟶
a. Default Value

17. In python ___________ should be in the same order as that of the arguments.
a. Values
b. Parameters 
c. Function name
d. None of the above

Show Answer ⟶
b. Parameters

18. In python,________ statement returns the values from the function.
a. Reverse
b. Return 
c. Back
d. None of the above

Show Answer ⟶
b. Return

19. In python, function can be defined as _________ ways.
a. No argument and no return value
b. Argument and with return value
c. Arguments and no return value
d. All of the above 

Show Answer ⟶
d. All of the above

Function in Python MCQ

20. The Python interpreter starts executing the instructions in a program from the _________.
a. First Statement 
b. Second Statement
c. Third Statement
d. None of the above

Show Answer ⟶
a. First Statement

21. The translator executes the code one by one is known as __________.
a. Translator
b. Compiler
c. Interpreter 
d. None of the above

Show Answer ⟶
c. Interpreter

22. A variable defined inside a function cannot be accessed ________ it.
a. Outside 
b. Inside
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Outside

23. A variable that has global scope is known as a ___________.
a. Local variable
b. Global variable 
c. Define variable
d. None of the above

Show Answer ⟶
b. Global variable

24. A variable that has a local scope is known as a ________.
a. Local variable 
b. Global variable
c. Define variable
d. None of the above

Show Answer ⟶
a. Local variable

Function in Python MCQ

25. In Python, a variable that is defined outside any function or any block is known as a ________.
a. Local variable
b. Global variable 
c. Define variable
d. None of the above

Show Answer ⟶
b. Global variable

26. Any change made to the global variable will impact ___________ in the program where that variable can be accessed.
a. Only one function
b. All the functions 
c. Only two functions
d. None of the above

Show Answer ⟶
b. All the functions

27. A variable that is defined inside any function or a block is known as a __________.
a. Local variable 
b. Global variable
c. Define variable
d. None of the above

Show Answer ⟶
a. Local variable

28. Any modification to a global variable is permanent and affects _________ where it is used.
a. Only one function
b. All the functions 
c. Only two functions
d. None of the above

Show Answer ⟶
b. All the functions

29. If a variable with the same name as the global variable is defined inside a function, then it is considered _________ to that function.
a. Local variable 
b. Global variable
c. Define variable
d. None of the above

Show Answer ⟶
a. Local variable

Function in Python MCQ

30. For a complex problem, it may not be feasible to manage the code in one single file. Then, the program is divided into different parts under different levels, called ________.
a. Modules 
b. Code
c. Variable
d. None of the above

Show Answer ⟶
a. Modules

31. What is the extension of python?
a. .pyy
b. .py 
c. .pyh
d. None of the above

Show Answer ⟶
b. .py

32. What is the syntax of import statements in python?
a. import modulename1 [,modulename2, …] 
b. imp modulename1 [,modulename2, …]
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. import modulename1 [,modulename2, …]

33. To call a function of a module, the function name should be preceded with the name of the module with a _______.
a. comma(,)
b. dot(.) 
c. Semicolon(;)
d. None of the above

Show Answer ⟶
b. dot(.)

34. _________ functions that are used for generating random numbers.
a. random.random()
b. random.randint()
c. random.randrange()
d. All of the above 

Show Answer ⟶
d. All of the above

Function in Python MCQ

35. In programming, functions are used to achieve modularity and reusability.
a. Modularity
b. Reusability
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

36. Function can be defined as a named group of instructions that are executed when the function is invoked or called by its name.
a. Its name 
b. Other names
c. No name
d. All of the above

Show Answer ⟶
a. Its name

37. Programmers can write their own functions known as _________.
a. Pre defined function
b. User defined function
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

38. The Python interpreter has a number of functions built into it. These are the functions that are frequently used in a Python program. Such functions are known as _________.
a. built in program
b. built in function 
c. built in arguments
d. None of the above

Show Answer ⟶
b. built in function

39. An __________ is a value passed to the function during a function call which is received in a parameter defined in the function header.
a. Argument 
b. function
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Argument

Function in Python MCQ

40. Python allows assigning a ________ to the parameter.
a. Predefined value
b. default value 
c. No value
d. None of the above

Show Answer ⟶
b. default value

41. A function returns value(s) to the calling function using ________.
a. Reverse statement
b. Return statement 
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Return statement

42. Multiple values in Python are returned through a _______.
a. String
b. Tuple 
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Tuple

43. The part of the program where a variable is accessible is defined as the _________.
a. Scope of the variable 
b. Scope of the function
c. Scope of the code
d. None of the above

Show Answer ⟶
a. Scope of the variable

44. A variable that is defined outside any particular function or block is known as a ___________. It can be accessed anywhere in the program.
a. Local variable
b. Global variable 
c. Define variable
d. None of the above

Show Answer ⟶
b. Global variable

Function in Python MCQ

45. A variable that is defined inside any function or block is known as a __________. It can be accessed only in the function or block where it is defined. It exists only till the function executes or remains active.
a. Local variable 
b. Global variable
c. Define variable
d. None of the above

Show Answer ⟶
a. Local variable

46. A module can be imported in a program using ________ statement.
a. Insert
b. Invoke
c. Import 
d. All of the above

Show Answer ⟶
c. Import
omputer Science Class 11 Notes
Computer Science Class 11 MCQ
Computer Science Class 11 NCERT Solutions

Computer Science Class 11 Practical Questions and Answers

Societal Impact Class 11 NCERT Solutions

Teachers and Examiners (CBSESkillEduction) collaborated to create the Societal Impact Class 11 NCERT Solutions. All the important Information are taken from the NCERT Textbook Computer Science (083) class 11.

Societal Impact Class 11 NCERT Solutions

1. After practicals, Atharv left the computer laboratory but forgot to sign off from his email account. Later, his classmate Revaan started using the same computer. He is now logged in as Atharv. He sends inflammatory email messages to few of his classmates using Atharv’s email account. Revaan’s activity is an example of which of the following cyber crime? Justify your answer.
a) Hacking
b) Identity theft
c) Cyber bullying
d) Plagiarism

Answer – Identity theft

2. Rishika found a crumpled paper under her desk. She picked it up and opened it. It contained some text which was struck off thrice. But she could still figure out easily that the struck off text was the email ID and password of Garvit, her classmate. What is ethically correct for Rishika to do?
a) Inform Garvit so that he may change his password.
b) Give the password of Garvit’s email ID to all other classmates.
c) Use Garvit’s password to access his account.

Answer – Inform Garvit so that he may change his password.

3. Suhana is down with fever. So she decided not to go to school tomorrow. Next day, in the evening she called up her classmate, Shaurya and enquired about the computer class. She also requested him to explain the concept. Shaurya said, “Mam taught us how to use tuples in python”.

Further, he generously said, “Give me some time, I will email you the material which will help you to understand tuples in python”. Shaurya quickly downloaded a 2-minute clip from the Internet explaining the concept of tuples in python. Using video editor, he added the text “Prepared by Shaurya” in the downloaded video clip. Then, he emailed the modified video clip to Suhana. This act of Shaurya is an example of:
a) Fair use
b) Hacking
c) Copyright infringement
d) Cyber crime

Answer – Copyright infringement

4. After a fight with your friend, you did the following activities. Which of these activities is not an example of cyber bullying?
a) You sent an email to your friend with a message saying that “I am sorry”.
b) You sent a threatening message to your friend saying “Do not try to call or talk to me”.
c) You created an embarrassing picture of your friend and uploaded on your account on a social networking site.

Answer – You sent an email to your friend with a message saying that “I am sorry”.

5. Sourabh has to prepare a project on “Digital India Initiatives”. He decides to get information from the Internet. He downloads three web pages (webpage 1, webpage 2, webpage 3) containing information on Digital India Initiatives. Which of the following steps taken by Sourabh is an example of plagiarism or copyright infringement. Give justification in support of your answer.

a) He read a paragraph on “ Digital India Initiatives” from webpage 1 and rephrased it in his own words. He finally pasted the rephrased
paragraph in his project.
b) He downloaded three images of “ Digital India Initiatives” from webpage 2. He made a collage for his project using these images.
c) He downloaded “Digital India Initiative” icon from web page 3 and pasted it on the front page of his project report.

Answer –
a) Plagiarism – Plagiarism occurs even when someone uses an idea or a product that has already been developed but portrays it as their own.
b) Plagiarism – Because the artist stole existing photos and presented them as his own.
c) Copyright infringement – When we utilise someone else’s creative work without asking permission or, if the work is being sold, without paying for it, we are violating their copyright.

6. Match the following:

societal impact class 11 ncert solutions
societal impact class 11 ncert solutions

Answer –
Plagiarism – Copy and paste information from the Internet into your report and then organise it
Hacker – Breaking into computers to read private emails and other files.
Credit and fraud – Fakers, by offering special rewards or money prize asked for personal information, such as bank account information
Digital FootPrint- The trail that is created when a person uses the Internet.

7. You got the below shown SMS from your bank querying a recent transaction. Answer the following:
a) Will you SMS your pin number to the given contact number?
b) Will you call the bank helpline number to recheck the validity of the SMS received?

Answer –
a) I will not SMS my pin because my bank never requests such sensitive data.
b) The bank needs to be notified because it can be a fraud case so they can assist in finding the crooks.

8. Preeti celebrated her birthday with her family. She was excited to share the moments with her friend Himanshu. She uploaded selected images of her birthday party on a social networking site so that Himanshu can see them. After few days, Preeti had a fight with Himanshu. Next morning, she deleted her birthday photographs from that social networking site, so that Himanshu cannot access them.

Later in the evening, to her surprise, she saw that one of the images which she had already deleted from the social networking site was available with their common friend Gayatri. She hurriedly enquired Gayatri “Where did you get this picture from?”. Gayatri replied “Himanshu forwarded this image few minutes back”. Help Preeti to get answers for the following questions. Give justification for your answers so that Preeti can understand it clearly.
a) How could Himanshu access an image which I had already deleted?
b) Can anybody else also access these deleted images?
c) Had these images not been deleted from my digital footprint?

Answer –
a) Because Himanshu must have had Preeti’s consent to duplicate those images as he must have a copy of her photos before she deleted them.
b) After deleting no one can access but previously any one have downloaded then they can share the images
c) Although Himanshu attempted to duplicate these photos in a wrong manner, they are still available even if they have been deleted from her digital trace.

9. The school offers wireless facility (wifi) to the Computer Science students of Class XI. For communication, the network security staff of the school have a registered URL schoolwifi.edu. On 17 September 2017, the following email was mass distributed to all the Computer Science students of Class XI. The email claimed that the password of the students was about to expire. Instructions were given to go to URL to renew their password within 24 hours.
a) Do you find any discrepancy in this email?
b) What will happen if the student will click on the given URL?
c) Is the email an example of cyber crime? If yes, then specify which type of cyber crime is it. Justify your answer.

Answer –
a) Yes, I have already registered with schoolwifi.edu for wifi connection and the link shared in the mail is started with same domain name.
b) The student’s device could become infected with malware or viruses if they click on the provided URL.
c) Email is a type of cybercrime, yes. This is a form of email spoofing. A hacker or other malicious person poses as another user or device on a network in a spoofing attack to trick other users or systems into thinking they are real or authentic.


10. You are planning to go for a vacation. You surfed the Internet to get answers for the following queries:
a) Weather conditions
b) Availability of air tickets and fares
c) Places to visit
d) Best hotel deals
Which of your above mentioned actions might have created a digital footprint?

Answer – All the option mentioned above will create a digital footprint.

11. How would you recognise if one of your friends is being cyber bullied?
a) Cite the online activities which would help you detect that your friend is being cyber bullied?
b) What provisions are in IT Act 2000, (amended in 2008) to combat such situations.

Answer – a) Cite the online activities which would help you detect that your friend is being cyber bullied?

12. Write the differences between the following-
a) Copyrights and Patents
b) Plagiarism and Copyright infringement
c) Non-ethical hacking and Ethical hacking
d) Active and Passive footprints
e) Free software and Free and open source software

Answer –
a) Copyrights – Copyright provides creators with legal protection for their original written, photographic, audio, and other works. Creators and authors are given copyrights by default.
Patents – Typically, inventions are granted a patent. In contrast to copyright, the creator must submit an application (file) to patent the innovation. After receiving a patent, the owner gains the only authority to bar anyone from making, using, or selling the invention.

b) Plagiarism – Plagiarism is defined as the act of copying text or images from the Internet without crediting the author or source.
Copyright infringement – When we utilise someone else’s creative work without asking permission or, if the work is being sold, without paying for it, we are violating their copyright.

c) Non-ethical hacking – Gaining unauthorised access to computers or networks in order to steal sensitive data with the purpose of causing harm or taking down systems is a common practise.
Ethical hacking – It is a method that involves utilising a website to detect security gaps or vulnerabilities, then informing the website owner with the information obtained. Thus, ethical hacking actually serves to protect the owner from cyberattacks.

d) Active footprints –Data that we intentionally publish online, such as emails we write, comments or postings we make on various websites or applications, etc., is included in our active digital footprints.
Passive footprints – Passive digital footprints are the inadvertent digital data traces we leave online. This includes the data created when we use a mobile app, surf the internet, or visit a website. It appears as though you are the only one using the internet and supplying data, yet both the browser and the Internet Service Provider can record your online behaviour.

13. If you plan to use a short text from an article on the web, what steps must you take in order to credit the sources used?

Answer – The most crucial step is to keep track of the original source from which you will be copying the text and to make sure that you explicitly identify it everywhere you use it in your paper.

14. When you search online for pictures, how will you find pictures that are available in the free public domain. How can those pictures be used in your project without copyright violations?

Answer – There is a written note at the end of every image indicating whether the image is free to use or whether it is protected by copyright, in which case you will need to either pay to use it or provide attribution to the original creator.

15. Describe why it is important to secure your wireless router at home. Search the Internet to find the rules to create a reasonably secure password. Create an imaginary password for your home router. Will you share your password for home router with following people. Justify your answer.
a) Parents
b) Friends
c) Neighbours
d) Home Tutors

Answer – Because anyone with a Wi-Fi signal nearby can connect to the wireless router and use it for himself or to attack your devices and data, it is crucial to secure it. A password that is at least eight characters long and contains lowercase, uppercase, a number, and a few special characters is considered to be reasonably secure.

16. List down the steps you need to take in order to ensure
a) your computer is in good working condition for a longer time.
b) smart and safe Internet surfing.

Answer –
Don’ts-
1. Never go to websites you don’t trust.
2. Put infected programme.
3. Opt for unregistered, free antivirus software.

Do’s-
1. Set up a purchased copy of a reliable antivirus programme with a powerful firewall.

17. What is data privacy? Websites that you visit collect what type of information about you?

Answer – The area of information technology that deals with the disclosure of personal data to third parties is data privacy. Birthdates, biometric data, and other personal identity details are all considered to be personal information.
Websites typically gather information that can be used to tailor adverts so they can generate revenue from those ads. Depending on the website’s nature, the information they get may include your username, age, gender, and photographs.

18. In the computer science class, Sunil and Jagdish were assigned the following task by their teacher.
a) Sunil was asked to find information about “India, a Nuclear power”. He was asked to use Google Chrome browser and prepare his report using Google Docs.
b) Jagdish was asked to find information about “Digital India”. He was asked to use Mozilla Firefox browser and prepare his report using
Libre Office Writer.
What is the difference between technologies used by Sunil and Jagdish?

Answer – Jagdish has utilised open source software (here) Mozilla Firefox and Libre Office Writer while Sunil has used free software (here) Google Chrome and Google Docs.


19. Cite examples depicting that you were a victim of following cyber crime. Also, cite provisions in IT Act to deal with such a cyber crime.
a) Identity theft
b) Credit card account theft

Answer –
a) This kind of offence is described in Section 66C of the IT Act 2008. Paragraph 66C: Identity theft is punishable by imprisonment of either kind for a term that may not exceed three years, as well as by a fine that may not exceed one lakh rupees. This punishment depends on how dishonestly or fraudulently the offender used the electronic signature, password, or other unique identification feature of another person.

b) When someone gains access to your credit card account and uses it to make unlawful purchases, it is considered a kind of identity theft.

20. Sumit got good marks in all the subjects. His father gifted him a laptop. He would like to make Sumit aware of health hazards associated with inappropriate and excessive use of laptop. Help his father to list the points which he should discuss with Sumit.

Answer –
The risks of heavy laptop use include headache and eyestrain.
a. Overusing a laptop could keep him from studying.
b. He won’t be able to manage his time effectively. not engaging in games.
c. limiting laptop use.

Computer Science Class 11 Notes
Computer Science Class 11 MCQ
Computer Science Class 11 NCERT Solutions

Computer Science Class 11 Practical Questions and Answers

Societal Impact Class 11 MCQ

Teachers and Examiners (CBSESkillEduction) collaborated to create the Societal Impact Class 11 MCQ. All the important Information are taken from the NCERT Textbook Computer Science (083) class 11.

Societal Impact Class 11 MCQ

1. Whenever we surf the Internet using smartphones, tablets, computers, etc., we leave a trail of data reflecting the activities performed by us online, which is our ________.
a. Digital footprint t
b. Smart footprint
c. Social footprint
d. None of the above

Show Answer ⟶
a. Digital footprint

2. Digital footprints are also known as _________.
a. Digital print
b. Digital tattoos t
c. Digital Data
d. None of the above

Show Answer ⟶
b. Digital tattoos

3. Our digital footprint can be created and used with or without our knowledge. It includes _________.
a. Websites we visit
b. Emails we send
c. Any information we submit online
d. All of the above t

Show Answer ⟶
d. All of the above

4. Which of the following belongs to digital footprint _________.
a. Active digital footprints
b. Passive digital footprints
c. Both a) and b) t
d. None of the above

Show Answer ⟶
c. Both a) and b)

Societal Impact Class 11 MCQ

5. Active digital footprints which includes data that we _______.
a. Email we write
b. Responses or posts we make
c. Different websites or mobile apps
d. All of the above t

Show Answer ⟶
d. All of the above

6. Every time we use a smartphone to browse the web, we leave a data trail that reflects the online activities we engaged in. This data trail is known as our ________.
a. Digital footprint t
b. Smart footprint
c. Social footprint
d. None of the above

Show Answer ⟶
a. Digital footprint

7. The rights to copy, distribute, and perform publicly are some examples of the _______.
a. Copyright t
b. Trademark
c. Patent
d. All of the above

Show Answer ⟶
a. Copyright

8. EULA stands for __________.
a. End user license agreement t
b. End user license adorns
c. End user level agreement
d. None of the above

Show Answer ⟶
a. End user license agreement

9. The digital data trail we leave online unintentionally is called _________.
a. Passive digital footprints t
b. Active digital footprints
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Passive digital footprints

Societal Impact Class 11 MCQ

10. Everyone who is connected to the Internet may have a ________.
a. Digital footprint t
b. Social footprint
c. Smart footprint
d. None of the above

Show Answer ⟶
a. Digital footprint

11. We follow _________ etiquettes during our social interactions or while surfing the Internet.
a. Be Ethical
b. Be Respectful
c. Be Responsible
d. All of the above t

Show Answer ⟶
d. All of the above

12. We should not use _______ materials without the permission of the creator or owner.
a. Copyrighted t
b. Patent
c. Trademark
d. None of the above

Show Answer ⟶
a. Copyrighted

13. As an ethical digital citizen, we need to be careful while _________.
a. Streaming audio
b. Streaming Video
c. Downloading images and file
d. All of the above t

Show Answer ⟶
d. All of the above

14. Amit copies some internet articles without crediting the original author or source. This is known as _______.
a. Copyright
b. Trade mark
c. Plagiarism t
d. None of the above

Show Answer ⟶
c. Plagiarism

Societal Impact Class 11 MCQ

15. Unauthorized use of another’s trademark on goods and services is referred to as __________.
a. Trademark Infringement t
b. Plagiarism Infringement
c. Copyright Infringement
d. None of the above

Show Answer ⟶
a. Trademark Infringement

16. GPL stands for _______.
a. General Public License t
b. General Product License
c. General Purchase License
d. None of the above

Show Answer ⟶
a. General Public License

17. What do you mean by cyber bullying _________.
a. Insulting to others
b. Giving threats online
c. Sharing others personal information
d. All of the above t

Show Answer ⟶
d. All of the above

18. Accidentally leaving a digital data trail online is referred to as _________.
a. Active digital footprints
b. Passive digital footprints t
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Passive digital footprints

19. Which of the following public licence categories is most popular?
a. GPL t
b. CC
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. GPL

Societal Impact Class 11 MCQ

20. Which of the following belong to sensiteve data __________.
a. Bank details
b. Personal Information
c. Both a) and b) t
d. None of the above

Show Answer ⟶
c. Both a) and b)

21. The digital footprint we knowingly leave online is referred to as _______.
a. Active digital footprints t
b. Passive digital footprints
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Active digital footprints

22. CC stands for ____________.
a. Creative commons license t
b. Create common license
c. Create communicatee license
d. None of the above

Show Answer ⟶
a. Creative commons license

23. The actual implementation of the concept or invention will be protected by _______.
a. Trademark
b. Copyright
c. Patent t
d. None of the above

Show Answer ⟶
c. Patent

24. Good communication over email, chat room and other such forums require a digital citizen to abide by the communication etiquettes as _________.
a. Be polite
b. Be credible
c. Be Precise
d. All of the above t

Show Answer ⟶
d. All of the above

Societal Impact Class 11 MCQ

25. Hacking is referred to as ________ when it is done with good intentions.
a. Cyber hacking
b. Ethical hacking t
c. Unknown hacking
d. None of the above

Show Answer ⟶
b. Ethical hacking

26. Elements of data that can cause substantial harm, embarrassment, inconvenience and unfairness to an individual, if breached or compromised, is called ________.
a. Sensitive data t
b. Original data
c. Fake data
d. None of the above

Show Answer ⟶
a. Sensitive data

27. GPL is basically made to grant a ______ a public license.
a. Software
b. Application
c. Both a) and b) t
d. None of the above

Show Answer ⟶
c. Both a) and b)

28. Who among the following known as a “black hat hacker”?
a. Crackers
b. Malicious hackers
c. Both a) and b) t
d. None of the above

Show Answer ⟶
c. Both a) and b)

29. What does a black hacker do?
a. Break into computer systems with malicious intent
b. Violate the confidentiality
c. Both a) and b) t
d. None of the above

Show Answer ⟶
c. Both a) and b)

Societal Impact Class 11 MCQ

30. What does a white hacker do?
a. Respect the rule of law
b. Identify company security flaws so they can make recommendations for improvement.
c. Also known as Ethical hacker
d. All of the above t

Show Answer ⟶
d. All of the above

31. IPR stands for _________.
a. Intellectual Property Right t
b. Internal Property Right
c. Indian Property Right
d. None of the above

Show Answer ⟶
a. Intellectual Property Right

32. A responsible internet user should follow ________.
a. Choose password wisely
b. Know who you befriend
c. Think before uploading
d. All of the above t

Show Answer ⟶
d. All of the above

33. We can share _______ on social media platforms.
a. Text message
b. Videos and Images
c. Personal or Bank related information
d. Both a) and b) t

Show Answer ⟶
d. Both a) and b)

34. FOSS stands for _______.
a. Free and Open source software t
b. First and Open source software
c. Flat and Open source software
d. None of the above

Show Answer ⟶
a. Free and Open source software

Societal Impact Class 11 MCQ

35. To be a responsible netizen (internet user), we should _______.
a. Frequently change the password
b. Choose secure password
c. Think before upload anything on the internet
d. All of the above t

Show Answer ⟶
d. All of the above

36. The act of presenting a person with a false website or email that appears original or authentic is known as _________.
a. Hacking
b. Phishing t
c. Identity theft
d. None of the above

Show Answer ⟶
b. Phishing

37. The name and logo of the company will be protected by ________.
a. Trademark t
b. Copyright
c. Patent
d. None of the above

Show Answer ⟶
a. Trademark

38. Which _________ operating system came under FOSS.
a. Unix
b. Microsoft
c. Ubuntu t
d. None of the above

Show Answer ⟶
c. Ubuntu

39. Ajit has developed a new computer science theory. He wants to legally guard it from unlawful use. He should take its ________.
a. Copyright t
b. Patent
c. Trademark
d. None of the above

Show Answer ⟶
a. Copyright

Societal Impact Class 11 MCQ

40. An example of a cybercrime where the victim is blackmailed into paying for access to the data is __________.
a. Identity theft
b. Ransomware t
c. Spamming
d. None of the above

Show Answer ⟶
b. Ransomware

41. Our digital footprints are saved in the form of ________ on local web browsers.
a. Cookies
b. Browser History
c. Both a) and b) t
d. None of the above

Show Answer ⟶
c. Both a) and b)

42. The traces and records we leave behind when using the internet are called _______.
a. Data protection
b. Digital Data
c. Digital Footprint t
d. None of the above

Show Answer ⟶
c. Digital Footprint

43. A ______ is someone who intentionally sows discord online by starting arguments, upsetting people, or posting irrelevant or offensive messages in online communities.
a. Copyright
b. Internet Bullying t
c. Cyber security
d. None of the above

Show Answer ⟶
b. Internet Bullying

44. _______ browser come under FOSS.
a. Google chrome
b. Firefox t
c. Microsoft edge
d. None of the above

Show Answer ⟶
b. Firefox

Societal Impact Class 11 MCQ

45. Digital communication includes _________.
a. Texting
b. Instant messaging
c. Email
d. All of the above t

Show Answer ⟶
d. All of the above

46. E-waste stands for ________.
a. Electronic waste t
b. Electrical waste
c. Ethical waste
d. None of the above

Show Answer ⟶
a. Electronic waste

47. Legal protection for intellectual property is provided by _______.
a. Patent
b. Copyright
c. Trademark
d. All of the above t

Show Answer ⟶
d. All of the above

48. Anyone who uses both digital and internet technology is a ________.
a. Digital citizen
b. Netizen
c. Both a) and b) t
d. None of the above

Show Answer ⟶
c. Both a) and b)

49. Which of the subsequent actions highlights leaving live digital traces?
a. Visiting a Website
b. Sending email t
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Sending email

Societal Impact Class 11 MCQ

50. The use of digital footprints is _______.
a. Trace user’s location
b. Know digital activity
c. Both a) and b) t
d. None of the above

Show Answer ⟶
c. Both a) and b)

51. In today’s technologically advanced society, can do ________ .
a. Online Education
b. Online Shopping
c. Online Banking
d. All of the above t

Show Answer ⟶
d. All of the above

52. Being a good digital citizens , we should _________.
a. Respect privacy of others
b. Avoid cyber bullying
c. Avoid copyright materials
d. All of the above t

Show Answer ⟶
d. All of the above

53. Online spreading of rumor’s, making threats online, disclosing personal information about the victim, and making comments intended to publicly mock a victim are all considered to be ______.
a. Cyber crime
b. Cyber bullying t
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Cyber bullying

54. Which of the following e-waste management strategies you will consider?
a. Reduce
b. Reuse
c. Recycle
d. All of the above t

Show Answer ⟶
d. All of the above

Societal Impact Class 11 MCQ

55. ______ are websites or applications that let users take part in the community by publishing and sharing content with others.
a. Banking website
b. Social media website t
c. Financial website
d. None of the above

Show Answer ⟶
b. Social media website

56. ________ software package come under FOSS.
a. Open Office
b. Libre Office
c. Both a) and b) t
d. None of the above

Show Answer ⟶
c. Both a) and b)

57. Which of the following belong to cyber crime law?
a. Hacking
b. Spamming
c. Phishing
d. All of the above t

Show Answer ⟶
d. All of the above

58. The law in India gives the user instructions on how to process, store, and transmit sensitive information.
a. Information Technology Act, 2000 t
b. Information Technology Act, 2001
c. Information Technology Act, 2002
d. Information Technology Act, 2003

Show Answer ⟶
a. Information Technology Act, 2000

59. Reselling used electronic products referred to as _________.
a. Reduce
b. Reuse
c. Recycle
d. Refurbishing t

Show Answer ⟶
d. Refurbishing

60. A scientific field known as _______ deals with building or setting up work environments, including the furniture, technology, and systems, to ensure user safety and comfort.
a. Arranger
b. Ergonomics t
c. Agronomics
d. None of the above

Show Answer ⟶
b. Ergonomics
Computer Science Class 11 Notes
Computer Science Class 11 MCQ
Computer Science Class 11 NCERT Solutions

Computer Science Class 11 Practical Questions and Answers

Tuples and Dictionaries in Python Class 11 Solutions

Teachers and Examiners (CBSESkillEduction) collaborated to create the Tuples and Dictionaries in Python Class 11 Solutions. All the important Information are taken from the NCERT Textbook Computer Science (083) class 11.

Tuples and Dictionaries in Python Class 11 Solutions

1. Consider the following tuples, tuple1 and tuple2:
tuple1 = (23,1,45,67,45,9,55,45)
tuple2 = (100,200)
Find the output of the following statements:
i. print(tuple1.index(45))
Answer – 2

ii. print(tuple1.count(45))
Answer – 3

iii. print(tuple1 + tuple2)
Answer – (23, 1, 45, 67, 45, 9, 55, 45, 100, 200)

iv. print(len(tuple2))
Answer – 2

v. print(max(tuple1))
Answer – 67

vi print(min(tuple1))
Answer – 1

vii. print(sum(tuple2))
Answer – 300

viii. print(sorted(tuple1))
print(tuple1)
Answer – [1, 9, 23, 45, 45, 45, 55, 67]
(23, 1, 45, 67, 45, 9, 55, 45)

2. Consider the following dictionary stateCapital:
stateCapital = {“AndhraPradesh”:”Hyderabad”,”Bihar”:”Patna”,”Maharashtra”:”Mumbai”,”Rajasthan”:”Jaipur”}
Find the output of the following statements:
i. print(stateCapital.get(“Bihar”))
Answer – Patna

ii. print(stateCapital.keys())
Answer – dict_keys([‘AndhraPradesh’, ‘Bihar’, ‘Maharashtra’, ‘Rajasthan’])

iii. print(stateCapital.values())
Answer – Dict_values([‘Hyderabad’, ‘Patna’, ‘Mumbai’, ‘Jaipur’])

iv. print(stateCapital.items())
Answer – dict_items([(‘AndhraPradesh’, ‘Hyderabad’), (‘Bihar’, ‘Patna’), (‘Maharashtra’, ‘Mumbai’), (‘Rajasthan’, ‘Jaipur’)])

v. print(len(stateCapital))
Answer – 4

vi print(“Maharashtra” in stateCapital)
Answer – True

vii. print(stateCapital.get(“Assam”))
Answer – None

viii. del stateCapital[“AndhraPradesh”]
print(stateCapital)
Answer – {‘Bihar’: ‘Patna’, ‘Maharashtra’: ‘Mumbai’, ‘Rajasthan’: ‘Jaipur’}

3. “Lists and Tuples are ordered”. Explain.
Answer – In Lists and Tuples, the items are retained in the order in which they are inserted. The elements can always be accessed based on their position. The element at the position or ‘index’ 0 will always be at index 0. Therefore, the Lists and Tuples are said to be ordered collections.

4. With the help of an example show how can you return more than one value from a function.
Answer – Multiple values can be returned by Python functions. After creating the return statement, the values that must be returned must be comma separated. Return a, b, and c as an example
The calling function will receive a tuple containing all three values, which it can then access just like a tuple’s elements. Here is the programme sample. –
def myfunction():
subject = “Computer Science”
marks=99
return subject, marks

values = myfunction()
print(“The values returned are : “,values)

Output
The values returned are : (‘Computer Science’, 99)

5. What advantages do tuples have over lists?
Answer – The following are some benefits of tuples over lists: Lists take longer than triples. The code is protected from any unintentional changes thanks to tuples. It is preferable to store non-changing data in “tuples” rather than “lists” if it is required by a programme.

6. When to use tuple or dictionary in Python. Give some examples of programming situations mentioning their usefulness.
Answer – For example, if a programme requires the name of a month, that information can be saved in a tuple as names are typically either repeated for a loop or occasionally referred to while the programme is running. The data’s unordered list is represented by a dictionary.

7. Prove with the help of an example that the variable is rebuilt in case of immutable data types.
Answer –
mytuple = (1, 2, 3)
mytuple[0] = 0
print(mytuple)

We can see that a tuple is immutable once generated; the only method to change it is to rebuild or reassign the tuple. Rebuilding entails reassigning, which entails completely altering the value, not just a portion of it. You won’t see an error if you try the following statement: tuple1 = (1,2). This is because you are reconstructing it.

8. TypeError occurs while statement 2 is running.
Give reason. How can it be corrected?
>>> tuple1 = (5) #statement 1
>>> len(tuple1) #statement 2
Answer – tuple1 = 5, indicating that it has an integer type, and as a result, statement 2 returns a TypeError.
By adding a comma while assigning the value tuple1 =, the error can be fixed (5,) Now, rather than reading this as a number, the Python interpreter will read it as a tuple.

Programming Problems

1. Write a program to read email IDs of n number of students and store them in a tuple. Create two new tuples, one to store only the usernames from the email IDs and second to store domain names from the email ids. Print all three tuples at the end of the program.
[Hint: You may use the function split()]

Answer –
n = int(input(“Enter number of students – “))
myList=[]
for i in range(n):
email=input(“Enter your email – “)
myList.append(email)
myTuple=tuple(myList)
names=[]
domains=[]
for i in myTuple:
name,domain = i.split(“@”)
names.append(name)
domains.append(domain)
names = tuple(names)
domains = tuple(domains)
print(“Person details”)
print(“Names = “,names)
print(“Domains Name = “,domains)
print(“Tuple = “,myTuple)

Output
Enter number of students – 2
Enter your email – amit@gmail.com
Enter your email – rajesh@gmail.com
Person details
Names = (‘amit’, ‘rajesh’)
Domains Name = (‘gmail.com’, ‘gmail.com’)
Tuple = (‘amit@gmail.com’, ‘rajesh@gmail.com’)

2. Write a program to input names of n students and store them in a tuple. Also, input a name from the user and find if this student is present in the tuple or not.
We can accomplish these by:
(a) writing a user defined function
(b) using the built-in function

Answer –
n = int(input(“Enter the number of students: “))
myList = []
for i in range(n):
name = input(“Enter Name : “)
myList.append(name)
myTuple = tuple(myList)
Search_Name = input(“Enter name to find: “)
def myfunction():
for item in myTuple:
if item==Search_Name:
print(“Name found”)
return
print(“Name not found”)

myfunction()

Output
Enter the number of students: 3
Enter Name : Rajesh
Enter Name : Ajit
Enter Name : Amit
Enter name to find: Rajesh
Name found

3. Write a Python program to find the highest 2 values in a dictionary.
Answer –
myDict ={“Computer Science”:99, “Information Technology”:98, “Web Application”:97, “Physical Education”:95}
myList = sorted(myDict.values())
s_max = myList[-2]
print(“Second largest element = “,s_max)

Output
Second largest element = 98

4. Write a Python program to create a dictionary from a string.
Note: Track the count of the letters from the string.
Sample string : ‘w3resource’
Expected output : {‘3’: 1, ‘s’: 1, ‘r’: 2, ‘u’: 1, ‘w’: 1, ‘c’: 1, ‘e’: 2, ‘o’: 1}
Answer –
str = input(“Enter a string: “)
myDict = {}
for char in str:
if char in myDict:
myDict[char] += 1
else:
myDict[char] =
for key in myDict:
print(key,’:’,myDict[key])

Output
Enter a string: Welcome to School
W : 1
e : 2
l : 2
c : 2
o : 4
m : 1
e : 2
t : 1
S : 1
h : 1

5. Write a program to input your friends’ names and their Phone Numbers and store them in the dictionary as the key-value pair. Perform the following operations on the dictionary:
a) Display the name and phone number of all your friends
b) Add a new key-value pair in this dictionary and display the modified dictionary
c) Delete a particular friend from the dictionary
d) Modify the phone number of an existing friend
e) Check if a friend is present in the dictionary or not
f) Display the dictionary in sorted order of names

Answer –
n = int(input(“Enter the number of name : “))
names={}
for i in range(n):
name=input(“Enter name : “)
mobile=input(“Enter mobile number: “)
names[name]=mobile
print(names)
names[“Rakesh”]=”9785457545″
print(“Modified dictionary “,names)
del names[“Rajesh”]
for name in names:
names[name] = “8787457545”
break
print(“Rakesh” in names)
for i in sorted (names) :
print((i, names[i]), end =” “)

Output
Enter the number of name : 3
Enter name : Rohit
Enter mobile number: 854565577
Enter name : Ramesh
Enter mobile number: 554125465
Enter name : Pranav
Enter mobile number: 5623451675
{‘Rohit’: ‘854565577’, ‘Ramesh’: ‘554125465’, ‘Pranav’: ‘5623451675’}
Modified dictionary {‘Rohit’: ‘854565577’, ‘Ramesh’: ‘554125465’, ‘Pranav’: ‘5623451675’, ‘Rakesh’: ‘9785457545’}

6. Write a program to take in the roll number, name and percentage of marks for n students of Class X. Write
user defined functions to
• accept details of the n students (n is the number of students)
• search details of a particular student on the basis of roll number and display result
• display the result of all the students
• find the topper amongst them
• find the subject toppers amongst them
(Hint: use Dictionary, where the key can be roll number and the value is an immutable data type containing name and percentage)
Answer –


n=int(input(“Enter the number of students “))
if n!=0:
myDict={}
for i in range(n):
rollno=int(input(“Enter roll number: “))
name=input(“Enter name: “)
percentage=float(input(“Enter marks percentage: “))
myDict[rollno]=(name,percentage)

num=int(input(“Enter the roll number for search: “))
if num in myDict.keys( ):
print(“Details Found!”)
print(“Name:”,myDict[num][0])
print(“Marks Obtained: “,myDict[num][-1],”%”,sep=””)
else:
print(“Not present.”)

Output
Enter the number of students 2
Enter roll number: 1
Enter name: Amit
Enter marks percentage: 91
Enter roll number: 2
Enter name: Rajesh
Enter marks percentage: 96
Enter the roll number for search: 1
Details Found!
Name: Amit
Marks Obtained: 91.0%

Computer Science Class 11 Notes
Computer Science Class 11 MCQ
Computer Science Class 11 NCERT Solutions

Computer Science Class 11 Practical Questions and Answers

MCQ on List Tuple and Dictionary in Python

Teachers and Examiners (CBSESkillEduction) collaborated to create the MCQ on List Tuple and Dictionary in Python. All the important Information are taken from the NCERT Textbook Computer Science (083) class 11.

MCQ on List Tuple and Dictionary in Python

1. A ________ is an ordered sequence of elements of different data types, such as integer, float, string or list.
a. Tuple 
b. Dictionaries
c. List
d. None of the above

Show Answer ⟶
a. Tuple

2. Elements of a tuple are enclosed in ________ and are separated by ________.
a. Parenthesis and commas 
b. Curly Brackets and commas
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Parenthesis and commas

3. In Tuple, If we assign the value without comma it is treated as ________.
a. Integer 
b. String
c. Decimal
d. None of the above

Show Answer ⟶
a. Integer

4. In Tuple, Sequence without parenthesis is treated as _________.
a. Tuple Error
b. Tuple by default 
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Tuple by default

5. Elements of a tuple can be accessed in the same way as a list or string using ________.
a. Indexing
b. Slicing
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

6. Tuple is __________ data types.
a. Immutable
b. Mutable
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

7. Immutable means __________.
a. Tuple cannot be changed after it has been created 
b. Tuple can be changed after it has been created
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Tuple cannot be changed after it has been created

8. Python allows us to join tuples using __________ operator.
a. Assignment
b. Concatenation 
c. Repetition
d. None of the above

Show Answer ⟶
b. Concatenation

9. ________ operator can also be used for extending an existing tuple.
a. Assignment
b. Concatenation 
c. Repetition
d. None of the above

Show Answer ⟶
b. Concatenation

11. Concatenation operator depicted by symbol ________.
a. –
b. *
c. + 
d. /

Show Answer ⟶
c. +

12. Repetition operation is depicted by the symbol ________.
a. –
b. * 
c. +
d. /

Show Answer ⟶
b. *

13. ______ operator help to repeat elements of a tuple.
a. Assignment
b. Concatenation
c. Repetition 
d. None of the above

Show Answer ⟶
c. Repetition

14. In python, the repetition operator requires the first operand to be a tuple and the second operand to be _________ only.
a. String
b. Decimal
c. Integer 
d. None of the above

Show Answer ⟶
c. Integer

15. The ________ operator checks if the element is present in the tuple.
a. In 
b. Not in
c. Out
d. Not Out

Show Answer ⟶
a. In

16. The ________ operator returns True if the element is not present in the tuple, else it returns False.
a. In
b. Not in 
c. Out
d. Not Out

Show Answer ⟶
b. Not in

17. _________ returns the length or the number of elements of the tuple.
a. tuple()
b. len() 
c. count()
d. index()

Show Answer ⟶
b. len()

18. ________ returns the number of times the given element appears in the tuple
a. tuple()
b. len()
c. count() 
d. index()

Show Answer ⟶
c. count()

19. _________ returns the index of the first occurrence of the element in the given tuple.
a. tuple()
b. len()
c. count()
d. index() 

Show Answer ⟶
d. index()

20. ________ returns minimum or smallest element of the tuple.
a max()
b. min() 
c. sum()
d. None of the above

Show Answer ⟶
b. min()

21. ________ returns maximum or largest element of the tuple.
a max() 
b. min()
c. sum()
d. None of the above

Show Answer ⟶
a max()

22. _________ returns sum of the element of the tuple.
a max()
b. min()
c. sum() 
d. None of the above

Show Answer ⟶
c. sum()

23. A tuple inside another tuple is called a _______.
a. Tuple Leader
b. Nested Tuple 
c. Inner Tuple
d. None of the above

Show Answer ⟶
b. Nested Tuple

24. In python, tuples values are enclosed in _______.
a. Curly brackets
b. Parenthesis 
c. Square brackets
d. None of the above

Show Answer ⟶
b. Parenthesis

25. What will be the output of the following code.
str = tuple(“Python”)
print(tuple)
a. [‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’]
b. (‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’) 
c. Python
d. None of the above

Show Answer ⟶
b. (‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’)

26. Which of the following is not a function of tuple?
a. sum()
b. max()
c. min()
d. delete() 

Show Answer ⟶
d. delete()

27. Which of the following belong to tuple?
a. Elements are enclosed in Parenthesis
b. Tuple is immutable
c. Tuple is a sequence data types
d. All of the above 

Show Answer ⟶
d. All of the above

28. Which of the following is the correct syntax to declare tuple?
a. t = 1,2,3
b. t = (‘a’,’b’,’c’)
c. t = (1,2,3)
d. All of the above 

Show Answer ⟶
d. All of the above

29. How you can delete tuple with single element?
a. t = 1,
b. t = (1,)
c. Both a) and b) 
d. t = [1]Show Answer ⟶

c. Both a) and b)

30. What will be the output of the following code.
t = (30)
type(t)
a. <class ‘float’>
b. <class ‘string’>
c. <class ‘int’> 
d. None of the above

Show Answer ⟶
c. <class ‘int’>

31. What will be the output of the following code.
t1 = (‘Computer’, ‘Science’)
t2 = (85, 65)
print(t1+t2)
a. (‘Computer’, ‘Science’, 85, 65) 
b. [‘Computer’, ‘Science’, 85, 65]
c. {‘Computer’, ‘Science’, 85, 65}
d. None of the above

Show Answer ⟶
a. (‘Computer’, ‘Science’, 85, 65)

32. Which of the following operator is used to replicate a tuple?
a. Modular
b. Exponent
c. Addition
d. Multiplication 

Show Answer ⟶
d. Multiplication

33. What will be the output of the following code.
t = (‘1’, ‘2’, ‘3’)
print(tuple(“Python”) + t)
a. [‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’, ‘1’, ‘2’, ‘3’]
b. (‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’, ‘1’, ‘2’, ‘3’) 
c. {‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’, ‘1’, ‘2’, ‘3’}
d. None of the above

Show Answer ⟶
b. (‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’, ‘1’, ‘2’, ‘3’)

34. Which of the following python function returns the length of tuple?
a. len() 
b. length()
c. leng()
d. None of the above

Show Answer ⟶
a. len()

35. What will be the output of the following code.
t1 = (1, 2, 3)
t2 = (4, 5, 6)
print(t1==t2)
a. True
b. False 
c. No Output
d. None of the above

Show Answer ⟶
b. False

36. What will be the output of the following code.
t1 = (1, 2, 3)
t2 = (1, 2, 3)
print(t1 == t2)
a. True 
b. False
c. No Output
d. None of the above

Show Answer ⟶
a. True

37. Which of the following function is used to delete the tuple name.
a. del 
b. delete
c. remove
d. None of the above

Show Answer ⟶
a. del

38. What will be the output of the following code.
t = (1, 2, 3, 4, 5)
print(max(t))
a. 1
b. 2
c. 4
d. 5 

Show Answer ⟶
d. 5

39. What will be the output of the following code.
t = (1, 2, 3, 4, 5)
print(min(t))
a. 1 
b. 2
c. 4
d. 5

Show Answer ⟶
a. 1

40. What will be the output of the following code.
t = (1, 2, 3, 4, 5)
print(sum(t))
a. 11 
b. 12
c. 14
d. 15 

Show Answer ⟶
d. 15

41. In tuple, which function is used to return the frequency of particular elements.
a. count() 
b. max()
c. min()
d. sum()

Show Answer ⟶
a. count()

42. Which of the following operation used in tuples?
a. Repetition
b. Concatenation
c. Slicing
d. All of the above 

Show Answer ⟶
d. All of the above

43. What will be the output of the following code.
t = (‘Computer’, ‘Science’)
print(max(t))
a. Computer
b. Science 
c. No Output
d. None of the above

Show Answer ⟶
b. Science

44. What will be the output of the following code.
t = (1, 2, 3)
print(t[1:3])
a. (1, 2)
b. (2, 3) 
c. (1, 3)
d. None of the above

Show Answer ⟶
b. (2, 3)

45. What will be the output of the following code.
t = (1, 2, 3)
print(t[1:-1])
a. (1, )
b. (2, ) 
c. (3, )
d. None of the above

Show Answer ⟶
b. (2, )

46. What will be the output of the following code.
t1 = (1, 2, 3)
t2 = (3, 2, 1)
print(t1>t2)
a. True
b. False 
c. No Output
d. None of the above

Show Answer ⟶
b. False

47. What will be the output of the following code.
t = (1, 2, 3)
print(sum(t, 3))
a. 3
b. 6
c. 9 
d. No Output

Show Answer ⟶
c. 9

48. What will be the output of the following code.
t1 = (1, 2)
t2 = 2 * t1
print(t2)
a. (1, 2, 1, 2) 
b. (1, 2, 2, 2)
c. (1, 1, 1, 2)
d. None of the above

Show Answer ⟶
a. (1, 2, 1, 2)

49. What will be the output of the following code.
t = (1, 2) * 3
print(t)
a. [1, 2, 1, 2, 1, 2]
b. (1, 2, 1, 2, 1, 2) 
c. {1, 2, 1, 2, 1, 2}
d. Error

Show Answer ⟶
b. (1, 2, 1, 2, 1, 2)

50. What will be the output of the following code.
t1 = (1,2,3)
t2 = slice(1,2)
print(t1[t2])
a. (1, )
b. (2, ) 
c. (3, )
d. None of the above

Show Answer ⟶
b. (2, )

51. _________ is a mapping between a set of keys and a set of values.
a. Dictionaries 
b. Tuples
c. List
d. None of the above

Show Answer ⟶
a. Dictionaries

52. Dictionary is also known as ________ data type.
a. Mapping 
b. Ordered
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Mapping

53. In dictionaries key-value pair is called an _______.
a. List
b. Item 
c. Value
d. None of the above

Show Answer ⟶
b. Item

54. Dictionaries in python are ________.
a. Mutable
b. Non-mutable
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

55. What will be the output of the following code.
myDict = {“Computer Science” : 94, “Information Technology” : 97}
print(myDict)
a. {‘Computer Science’: 94, ‘Information Technology’: 97} 
b. (‘Computer Science’: 94, ‘Information Technology’: 97)
c. Error
d. None of the above

Show Answer ⟶
a. {‘Computer Science’: 94, ‘Information Techonology’: 97}

56. What will be the output of the following code.
myDict = {“Computer Science” : 94, “Information Techonology” : 97}
myDict1 = {“Mathematics” : 91, “Physics” : 92}
print(myDict == myDict1)
a. True
b. False 
c. No Output
d. None of the above

Show Answer ⟶
b. False

57. The items in dictionaries are __________.
a. Ordered
b. Unordered 
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Unordered

58. In dictionary keys and values are separated by_______.
a. Comma (,)
b. Semicolon (;)
c. Colon (:) 
d. None of the above

Show Answer ⟶
c. Colon (:)

59. To create a dictionary, the items entered are separated by _______ and enclosed in ________.
a. Commas and Curly braces 
b. Commas and Round braces
c. Commas and Squair braces
d. None of the above

Show Answer ⟶
a. Commas and Curly braces

60. Which of the following function is used to delete an element from dictionary.
a. delete()
b. remove()
c. pop() 
d. None of the above

Show Answer ⟶
c. pop()

61. What will be the output of the following code.
myDict = {“Computer Science” : 94, “Information Technology” : 97}
print(myDict[“Computer Science”])
a. 94 
b. 97
c. “Computer Science”
d. “Information Technology”

Show Answer ⟶
a. 94

62. Keys in dictionary are _________.
a. Immutable 
b. Mutable
c. String
d. None of the above

Show Answer ⟶
a. Immutable

63. The keys in the dictionary must be _______ and should be of any ________ data type.
a. Unique and Mutable
b. Unique and Immutable 
c. Repeated and Mutable
d. None of the above

Show Answer ⟶
b. Unique and Immutable

64. In dictionary item of a sequence are accessed using a technique called _______.
a. List
b. Indexing 
c. Value
d. None of the above

Show Answer ⟶
b. Indexing

65. How we can create an empty dictionary?
a. myDic = ( )
b. myDic = [ ]
c. myDic = { } 
d. None of the above

Show Answer ⟶
c. myDic = { }

66. The membership operator ________ checks if the key is present in the dictionary and returns True, else it returns False.
a. In 
b. Not In
c. Not Out
d. None of the above

Show Answer ⟶
a. In

67. In which statement traversing can be done in dictionary.
a. Loop statement 
b. If statement
c. Break Statement
d. None of the above

Show Answer ⟶
a. Loop statement

68. The ________ operator returns True if the key is not present in the dictionary, else it returns False.
a. In
b. Not In 
c. Not Out
d. None of the above

Show Answer ⟶
b. Not In

69. What will be the output of the following code.
myDict = {“Computer” : 99, “Mathematics” : 98}
print(myDict)
a. {‘Computer’: 99, ‘Mathematics’: 98} 
b. (‘Computer’: 99, ‘Mathematics’: 98)
c. [‘Computer’: 99, ‘Mathematics’: 98]
d. None of the above

Show Answer ⟶
a. {‘Computer’: 99, ‘Mathematics’: 98}

70. The following code is an example of ________.
myDict = {N1 : {“Computer” : 99, “Mathematics” : 98}, N2 : {“Computer” : 99, “Mathematics” : 98}}
a. Nested Dictionary
b. Dictionary Inside Dictionary
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

71. ________ function creates a dictionary from a sequence of key-value pairs.
a. keys()
b. values()
c. dict() 
d. None of the above

Show Answer ⟶
c. dict()

72. Which of the following statements used to create dictionary?
a. myDict = {“Computer” : 99, “Mathematics” : 98}
b. myDict = {99 : “Computer”, 98 : “Mathematics”}
c. myDict = {}
d. All of the above 

Show Answer ⟶
d. All of the above

73. ________ function returns a list of keys in the dictionary.
a. keys() 
b. values()
c. dict()
d. None of the above

Show Answer ⟶
a. keys()

74. ________ function returns a list of values in the dictionary.
a. keys()
b. values() 
c. dict()
d. None of the above

Show Answer ⟶
b. values()

75. _______ function returns a list of tuples(key – value) pair.
a. keys()
b. items() 
c. dict()
d. None of the above

Show Answer ⟶
b. items()

76. To delete the dictionary from the memory we use _______ function.
a. update()
b. delete()
c. del() 
d. None of the above

Show Answer ⟶
c. del()

77. _______ function deletes or clear all the items of the dictionary.
a. delete()
b. clear() 
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. clear()

78. Dictionary keys must be _________.
a. Mutable
b. Unique 
c. Both a) and b)
c. None of the above

Show Answer ⟶
b. Unique

79. The data type list is an ordered sequence which is ________ and made up of one or more elements.
a. Mutable 
b. Immutable
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Mutable 

80. Which statement from the list below will be create a new list?
a. new_l = [1, 2, 3, 4]
b. new_l = list()
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b) 

81. List can content __________.
a. Integer
b. Float
c. String & Tuple
d. All of the above 

Show Answer ⟶
d. All of the above 

82. list are enclosed in square ________ and are separated by _________.
a. Brackets and comma 
b. Brackets and dot
c. Curli Brackets and dot
d. None of the above

Show Answer ⟶
a. Brackets and comma 

83. List elements may be of the following data types.
a. Different data types 
b. Same data types
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Different data types

84. In Python, lists are mutable. It means that ________.
a. The contents of the list can be changed after it has been created 
b. The contents of the list can’t changed after it has been created
c. The list cannot store the number data type.
d. None of the above

Show Answer ⟶
a. The contents of the list can be changed after it has been created 

85. What will be the output of the following python code
print(list(“Python”))
a. (‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’)
b. [‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’] 
c. (“P”, “y”, “t”, “h”, “o”, “n”)
d. [“P”, “y”, “t”, “h”, “o”, “n”]Show Answer ⟶

b. [‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’] 

86. The data type list allows manipulation of its contents through ________.
a. Concatenation
b. Repetition
c. Membership
d. All of the above 

Show Answer ⟶
d. All of the above

87. Python allows us to join two or more lists using __________ operator.
a. Concatenation 
b. Repetition
c. Membership
d. All of the above

Show Answer ⟶
a. Concatenation 

88. What will be the output of the following python code
new_list = [‘P’,’y’,’t’,’h’,’o’,’n’]
print(len(new_list))
a. 6 
b. 7
c. 8
d. 9

Show Answer ⟶
a. 6 

89. Example of concatenation operator _______.
a. –
b. + 
c. /
d. *

Show Answer ⟶
b. + 

90. If we try to concatenate a list with elements of some other data type, _________ occurs.
a. Runtime Error
b. Type Error 
c. Result
d. None of the above

Show Answer ⟶
b. Type Error 

91. Python allows us to replicate a list using repetition operator depicted by symbol _________.
a. –
b. +
c. /
d. * 

Show Answer ⟶
d. * 

92. Like strings, the membership operators _________ checks if the element is present in the list and returns True, else returns False.
a. In
b. Out
c. Listin
d. None of the above

Show Answer ⟶
a. In

93. We can access each element of the list or traverse a list using a _______.
a. For loop
b. While loop
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

94. _________ returns the length of the list passed as the argument.
a. len() 
b. length()
c. leth()
d. None of the above

Show Answer ⟶
a. len()

95. ________ creates an empty list if no argument is passed.
a. len()
b. list() 
c. append()
d. extend()

Show Answer ⟶
b. list()

96. ________ a single element passed as an argument at the end of the list.
a. append() 
b. extend()
c. insert()
d. None of the above

Show Answer ⟶
a. append() 

97. Which of the following command is used to add an element in list?
a. new_list.add(5)
b. new_list.added(5)
c. new_list.append(5) 
d. All of the above

Show Answer ⟶
c. new_list.append(5) 

98. _________ returns the number of times a given element appears in the list.
a. insert()
b. index()
c. count() 
d. None of the above

Show Answer ⟶
c. count() 

99. _________ returns index of the first occurrence of the element in the list. If the element is not present, ValueError is generated.
a. insert()
b. index() 
c. count()
d. None of the above

Show Answer ⟶
b. index() 

100. ________ function removes the given element from the list. If the element is present multiple times, only the first occurrence is removed.
a. delete()
b. rem()
c. remove() 
d. None of the above

Show Answer ⟶
c. remove() 

101. _______ function returns the element whose index is passed as parameter to this function and also removes it from the list.
a. push()
b. remove()
c. pop() 
d. None of the above

Show Answer ⟶
c. pop() 

102. What will be the output of the following python code.
new_list = [9, 8, 7]
print(sum(new_list))
a. 22
b. 23
c. 24 
d. 25

Show Answer ⟶
c. 24 

103. What will be the output of the following python code.
new_list = [9, 8, 7]
print(min(new_list))
a. 9
b. 8
c. 7 
d. None of the above

Show Answer ⟶
c. 7
Computer Science Class 11 Notes
Computer Science Class 11 MCQ
Computer Science Class 11 NCERT Solutions

Computer Science Class 11 Practical Questions and Answers

Tuples in Python Class 11 MCQ

Teachers and Examiners (CBSESkillEduction) collaborated to create the Tuples in Python Class 11 MCQ. All the important Information are taken from the NCERT Textbook Computer Science (083) class 11.

Tuples in Python Class 11 MCQ

1. A ________ is an ordered sequence of elements of different data types, such as integer, float, string or list.
a. Tuple 
b. Dictionaries
c. List
d. None of the above

Show Answer ⟶
a. Tuple

2. Elements of a tuple are enclosed in ________ and are separated by ________.
a. Parenthesis and commas 
b. Curly Brackets and commas
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Parenthesis and commas

3. In Tuple, If we assign the value without comma it is treated as ________.
a. Integer 
b. String
c. Decimal
d. None of the above

Show Answer ⟶
a. Integer

4. In Tuple, Sequence without parenthesis is treated as _________.
a. Tuple Error
b. Tuple by default 
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Tuple by default

5. Elements of a tuple can be accessed in the same way as a list or string using ________.
a. Indexing
b. Slicing
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

6. Tuple is __________ data types.
a. Immutable
b. Mutable
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

7. Immutable means __________.
a. Tuple cannot be changed after it has been created 
b. Tuple can be changed after it has been created
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Tuple cannot be changed after it has been created

8. Python allows us to join tuples using __________ operator.
a. Assignment
b. Concatenation 
c. Repetition
d. None of the above

Show Answer ⟶
b. Concatenation

9. ________ operator can also be used for extending an existing tuple.
a. Assignment
b. Concatenation 
c. Repetition
d. None of the above

Show Answer ⟶
b. Concatenation

11. Concatenation operator depicted by symbol ________.
a. –
b. *
c. + 
d. /

Show Answer ⟶
c. +

12. Repetition operation is depicted by the symbol ________.
a. –
b. * 
c. +
d. /

Show Answer ⟶
b. *

13. ______ operator help to repeat elements of a tuple.
a. Assignment
b. Concatenation
c. Repetition 
d. None of the above

Show Answer ⟶
c. Repetition

14. In python, the repetition operator requires the first operand to be a tuple and the second operand to be _________ only.
a. String
b. Decimal
c. Integer 
d. None of the above

Show Answer ⟶
c. Integer

15. The ________ operator checks if the element is present in the tuple.
a. In 
b. Not in
c. Out
d. Not Out

Show Answer ⟶
a. In

16. The ________ operator returns True if the element is not present in the tuple, else it returns False.
a. In
b. Not in 
c. Out
d. Not Out

Show Answer ⟶
b. Not in

17. _________ returns the length or the number of elements of the tuple.
a. tuple()
b. len() 
c. count()
d. index()

Show Answer ⟶
b. len()

18. ________ returns the number of times the given element appears in the tuple
a. tuple()
b. len()
c. count() 
d. index()

Show Answer ⟶
c. count()

19. _________ returns the index of the first occurrence of the element in the given tuple.
a. tuple()
b. len()
c. count()
d. index() 

Show Answer ⟶
d. index()

20. ________ returns minimum or smallest element of the tuple.
a max()
b. min() 
c. sum()
d. None of the above

Show Answer ⟶
b. min()

21. ________ returns maximum or largest element of the tuple.
a max() 
b. min()
c. sum()
d. None of the above

Show Answer ⟶
a max()

22. _________ returns sum of the element of the tuple.
a max()
b. min()
c. sum() 
d. None of the above

Show Answer ⟶
c. sum()

23. A tuple inside another tuple is called a _______.
a. Tuple Leader
b. Nested Tuple 
c. Inner Tuple
d. None of the above

Show Answer ⟶
b. Nested Tuple

24. In python, tuples values are enclosed in _______.
a. Curly brackets
b. Parenthesis 
c. Square brackets
d. None of the above

Show Answer ⟶
b. Parenthesis

25. What will be the output of the following code.
str = tuple(“Python”)
print(tuple)
a. [‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’]
b. (‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’) 
c. Python
d. None of the above

Show Answer ⟶
b. (‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’)

26. Which of the following is not a function of tuple?
a. sum()
b. max()
c. min()
d. delete() 

Show Answer ⟶
d. delete()

27. Which of the following belong to tuple?
a. Elements are enclosed in Parenthesis
b. Tuple is immutable
c. Tuple is a sequence data types
d. All of the above 

Show Answer ⟶
d. All of the above

28. Which of the following is the correct syntax to declare tuple?
a. t = 1,2,3
b. t = (‘a’,’b’,’c’)
c. t = (1,2,3)
d. All of the above 

Show Answer ⟶
d. All of the above

29. How you can delete tuple with single element?
a. t = 1,
b. t = (1,)
c. Both a) and b) 
d. t = [1]Show Answer ⟶

c. Both a) and b)

30. What will be the output of the following code.
t = (30)
type(t)
a. <class ‘float’>
b. <class ‘string’>
c. <class ‘int’> 
d. None of the above

Show Answer ⟶
c. <class ‘int’>

31. What will be the output of the following code.
t1 = (‘Computer’, ‘Science’)
t2 = (85, 65)
print(t1+t2)
a. (‘Computer’, ‘Science’, 85, 65) 
b. [‘Computer’, ‘Science’, 85, 65]
c. {‘Computer’, ‘Science’, 85, 65}
d. None of the above

Show Answer ⟶
a. (‘Computer’, ‘Science’, 85, 65)

32. Which of the following operator is used to replicate a tuple?
a. Modular
b. Exponent
c. Addition
d. Multiplication 

Show Answer ⟶
d. Multiplication

33. What will be the output of the following code.
t = (‘1’, ‘2’, ‘3’)
print(tuple(“Python”) + t)
a. [‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’, ‘1’, ‘2’, ‘3’]
b. (‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’, ‘1’, ‘2’, ‘3’) 
c. {‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’, ‘1’, ‘2’, ‘3’}
d. None of the above

Show Answer ⟶
b. (‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’, ‘1’, ‘2’, ‘3’)

34. Which of the following python function returns the length of tuple?
a. len() 
b. length()
c. leng()
d. None of the above

Show Answer ⟶
a. len()

35. What will be the output of the following code.
t1 = (1, 2, 3)
t2 = (4, 5, 6)
print(t1==t2)
a. True
b. False 
c. No Output
d. None of the above

Show Answer ⟶
b. False

36. What will be the output of the following code.
t1 = (1, 2, 3)
t2 = (1, 2, 3)
print(t1 == t2)
a. True 
b. False
c. No Output
d. None of the above

Show Answer ⟶
a. True

37. Which of the following function is used to delete the tuple name.
a. del 
b. delete
c. remove
d. None of the above

Show Answer ⟶
a. del

38. What will be the output of the following code.
t = (1, 2, 3, 4, 5)
print(max(t))
a. 1
b. 2
c. 4
d. 5 

Show Answer ⟶
d. 5

39. What will be the output of the following code.
t = (1, 2, 3, 4, 5)
print(min(t))
a. 1 
b. 2
c. 4
d. 5

Show Answer ⟶
a. 1

40. What will be the output of the following code.
t = (1, 2, 3, 4, 5)
print(sum(t))
a. 11 
b. 12
c. 14
d. 15 

Show Answer ⟶
d. 15

41. In tuple, which function is used to return the frequency of particular elements.
a. count() 
b. max()
c. min()
d. sum()

Show Answer ⟶
a. count()

42. Which of the following operation used in tuples?
a. Repetition
b. Concatenation
c. Slicing
d. All of the above 

Show Answer ⟶
d. All of the above

43. What will be the output of the following code.
t = (‘Computer’, ‘Science’)
print(max(t))
a. Computer
b. Science 
c. No Output
d. None of the above

Show Answer ⟶
b. Science

44. What will be the output of the following code.
t = (1, 2, 3)
print(t[1:3])
a. (1, 2)
b. (2, 3) 
c. (1, 3)
d. None of the above

Show Answer ⟶
b. (2, 3)

45. What will be the output of the following code.
t = (1, 2, 3)
print(t[1:-1])
a. (1, )
b. (2, ) 
c. (3, )
d. None of the above

Show Answer ⟶
b. (2, )

46. What will be the output of the following code.
t1 = (1, 2, 3)
t2 = (3, 2, 1)
print(t1>t2)
a. True
b. False 
c. No Output
d. None of the above

Show Answer ⟶
b. False

47. What will be the output of the following code.
t = (1, 2, 3)
print(sum(t, 3))
a. 3
b. 6
c. 9 
d. No Output

Show Answer ⟶
c. 9

48. What will be the output of the following code.
t1 = (1, 2)
t2 = 2 * t1
print(t2)
a. (1, 2, 1, 2) 
b. (1, 2, 2, 2)
c. (1, 1, 1, 2)
d. None of the above

Show Answer ⟶
a. (1, 2, 1, 2)

49. What will be the output of the following code.
t = (1, 2) * 3
print(t)
a. [1, 2, 1, 2, 1, 2]
b. (1, 2, 1, 2, 1, 2) 
c. {1, 2, 1, 2, 1, 2}
d. Error

Show Answer ⟶
b. (1, 2, 1, 2, 1, 2)

50. What will be the output of the following code.
t1 = (1,2,3)
t2 = slice(1,2)
print(t1[t2])
a. (1, )
b. (2, ) 
c. (3, )
d. None of the above

Show Answer ⟶
b. (2, )
Computer Science Class 11 Notes
Computer Science Class 11 MCQ
Computer Science Class 11 NCERT Solutions

Computer Science Class 11 Practical Questions and Answers

error: Content is protected !!