Home Page [www.mystudyzone.com]



SAMPLE PAPER Session Ending ExamXI- Computer Science (083)BLUE PRINT S. No Typology of Questions Very Short Answer (VSA) (1 mark) Short Answer-I (SA-I) (2 marks) Short Answer -II (SA-II) (3 marks) Long Answer (L.A.) (4 marks) Long Answer(L.A.) (6 marks) Total Marks 1 Programing and Computational Thinking (Unit1) 5 5 4 2 - 35 2 CSO (Unit2) 2 4 -- – -- 10 3 Data Management (DM-1, Unit 3) 14-- - 115 4 Society, Law and Ethics (SLE-1)- Cyber Safety (Unit 4) 24 - - - 10 Total Marks 10 3412 8 6 70 SAMPLE PAPER Session Ending Exam CLASS XI Computer Science (083)Time allowed: 3 hours] [Maximum marks: 70]Instructions: (i) Programming Language: PYTHON.(ii) All Questions are compulsory within each section.Q1 (a) What is the syntax to print output in a single line.1(b) List any two common datatypes used in python.1(c) Write main difference between list and tuple constructs of Python.1(d) Give any two example of Python runtime errors. 1 (e) Write the output produced by this program below:- Words= ‘Hello World’ print((words.title()) print(words.replace (“World”, ‘Oswal’)) print(words.upper()) print(words *2)2 (f) Write a program to enter a number in python and print its octal and hexadecimal equivalent.2 (g) Write a program to illustrate the difference between break and continue statements.2Q2 (a) What is a function call IN PYTHON? Give Example.2 (b) Write a Python program to sort a list of elements using the bubble sort algorithm.2 (c) What types of conditional structures are present in programming language? How many of them are supported in python?3 (d) Write a python program to receive the numbers from user through keyboard until user Gives 0 (to end the input process), then the program calculate and display the sum of given odd numbers and even numbers respectively.e.g.if the user gives the following sequence of numbers:7 5 10 14 3 9 11 12Then the output should be as follows:The Sum of even numbers in given input sequence = 36The Sum of odd numbers in given input sequence = 35 4Q3 (a) Write Python statement for the following : If variable sum is equal to 10 and total is less than 20, print the text string “Incorrect” using if statement.1 (b) Write pseudo-code / flowchart to input the year and to test and display whether the given year is leap year or not?3 (c) Write a program in Python to check a given String is Palindrome or not.3 (d) Write a program in Python to create a dictionary from a string with frequency of letters3Q4 (a) What are dictionaries? Define keys(), values() and items() methods of dictionary.4 (b) Define Software.1 (c) What does a bus mean?1 (d) Write two differences between Bluetooth and infrared2 (e) What is the concept of Cloud Computing?2 Q5 (a) Define Operating system. Give the names of any three operating systems.2 (b) Draw XOR gate using minimum number of NAND gate. OR Convert Hexadecimal Number ( A2DE ) into its equivalent Octal Number.2 (c) What are the advantages of using a DBMS?2 (d) Differentiate between DDL and DML?2 (e) A table "Animals" in a database has 3 columns and 10 records. What is the degree and cardinality of this table?2Q6 (a) Write the SQL command to create the following table as Deptm with constraints. Field NameField TypeConstraintDEPTNOIntegerNOT NULL PRIMARY KEYDNAMEVarchar(14)NOT NULLLOCVarchar(13)SalaryInteger(5)2 (b) Write a SQL command to add following column in above table Deptm. Column NameData TypeSizeConstraintDescriptionAddressVarchar40Address of the Person1 Write SQL Commands for the questions form (i) to (vi) on the basis of table Teacher.[6 X 1M]Table : TeacherNo.NameAgeDepartmentDateojjoinSalarySex1Jugal34Computer2007-02-1012000M2Shanti31History2008-03-2420000F3Sandeep32Maths2009-02-2514000M4Sangeeta45History2007-04-1520000F5Rakesh35Computer2007-05-1721000MTo show all information about the teacher of History department in descending order of their name .To list the male teacher who are in Maths department.To display Name, Salary, Age of all male teacher.Update the Salary by increasing Rs. 1000 for female teacher.To Insert a new record in table Teacher with the following data : 9, ‘Raja’, 23, ‘Hindi’, ‘2005-08-19’,12675, ‘M’Display the name of those teacher whose name started with alphabet ‘S’;6Q7 (a) What is cyber bullying .1 (b) Write the appropriate usage of social networks.1 (c) What is cyber safety? Why is it important?2 (d) What Is Backup and Recovery? Is it necessary to take backup of data?2 (e) Differentiate between adware and malware.2 (f) List rules for safely browsing the web2SAMPLE PAPER Session Ending ExamXI- Computer Science (083)Time: 3hrMARKING SCHEMEMM: 70Q. No. Suggested / Expected Answer with HintMarksQ1 (a) What is the syntax to print output in a single line in Python.1 Ans # use the named argument "end" to explicitly specify the end of line string print("Hello World!", end = '') (b) List any two common datatypes used in python.1Ans: Basic Data Types in PythonIntegers.Floating-Point plex Numbers.Strings. Boolean Type (any two )(c) Write main difference between list and tuple constructs of Python.1Ans: The main difference between lists and a tuples is the fact that lists are mutable whereas tuples are immutable. A mutable data type means that a python object of this type can be modified.(d) Give any two example of Python runtime errors. 1 Division by zero, performing an operation on incompatible types, trying to access a file which Doesn’t exist or any other two example of Python runtime errors. (any two ) (e) Write the output produced by this program below:- Words= ‘Hello World’ print((words.title()) print(words.replace (“World”, ‘Oswal’)) print(words.upper()) print(words *2)2 Ans: Hello World Hello Oswal HELLO OSWAL HELLO OSWAL HELLO OSWAL (f) Write a program to enter a number in python and print its octal and hexadecimal equivalent.2Ans: num = int(input("enter a decimal number: "))print("octal form is ", oct(num))print("hexadecimal form is ", hex(num)) (g) Write a program to illustrate the difference between break and continue statements.2 Ans: In Python, break statements are used to exit (or "break) a conditional loop that uses "for" or "while". After the loop ends, the code will pick up from the line immediately following the break statement. The continue statement is used to skip over certain parts of a loop. Here's an example: for y in range(7) if (y==5): continue or break print(y)Q2 (a) What is a function call IN PYTHON? Give Example.2 Ans: Once we have defined a function, we can call it from another function, program or even the Python prompt. To call a function, use the function name followed by parenthesis: Example def my_function():? print("Hello from a function") my_function() #function call (b) Write a Python program to sort a list of elements using the bubble sort algorithm.2Ans:def bubbleSort(nlist): for passnum in range(len(nlist)-1,0,-1): for i in range(passnum): if nlist[i]>nlist[i+1]: temp = nlist[i] nlist[i] = nlist[i+1] nlist[i+1] = tempnlist = [14,46,43,27,57,41,45,21,70]bubbleSort(nlist)print(nlist) (c) What types of conditional structures are present in programming language? How many of them are supported in python?3Ans: Decision Statements or selection statements are the statements which produce a certain output based upon a condition.Some decision statements commonly supported by all languages are:(i) If…ElseThis enables the programmer to provide different paths for the program flow depending on certain conditions. . Syntax:if (condition){//statements to be executed;}else{//statements to be executed;}(ii) Nested IfYou can have an ‘if’ statement within another ‘if’ statement. This is known as nested ‘if’. The program flow will enter into the inner ‘if’ condition only if the outer ‘if’ condition is satisfied. In general form nested ‘if’ will be of the form:if (condition1){//code to be executed if ondition1 is trueif (condition2){//code to be executed if condition2 is true} }(iii) SwitchA switch statement is a type of selection control mechanism used to allow the value of a variable or expression to change the control flow of program execution via a multiway branch. Python supports if…else and nested if. (d) Write a python program to receive the numbers from user through keyboard until user Gives 0 (to end the input process), then the program calculate and display the sum of given odd numbers and even numbers respectively.e.g.if the user gives the following sequence of numbers:7 5 10 14 3 9 11 12Then the output should be as follows:The Sum of even numbers in given input sequence = 36The Sum of odd numbers in given input sequence = 35 4Ans:num_str = input("Input an integer (0 terminates):") num_int=int(num_str) even_sum=0 odd_sum=0 while num_int !=0: num_str = input("Input an integer (0 terminates):") num_int=int(num_str) for num_int in num_str: if num_int%2 == 0: even_count += 1 else: odd_count +=1print("")print("The Sum of even numbers in given input sequence = ", even_sum)print("The Sum of odd numbers in given input sequence =", odd_sum)Q3 (a) Write Python statement for the following : If variable sum is equal to 10 and total is less than 20, print the text string “Incorrect” using if statement.1 Ans: if( (sum == 10) && (total < 20) ) print("incorrect"); (b) Write pseudo-code / flowchart to input the year and to test and display whether the Given year is leap year or not?3 Ans: PSEUDOCODE:INPUT Y % Y= yearIF mod(Y,4)==0IF mod(Y,100)==0IF mod(Y,400)==0PRINT ‘Y is leap year’ELSEPRINT ‘Y is NOT leap year’ENDELSEPRINT ‘Y is leap year’ENDELSEPRINT ‘Y is NOT leap year’ flowchart (c) Write a program in Python to check a given String is Palindrome or not.3Ans: string = input("Please enter your own String : ")if(string == string[:: - 1]): print("This is a Palindrome String")else: print("This is Not a Palindrome String") (d) Write a program in Python to create a dictionary from a string with frequency of letters3Ans:str=raw_input("Enter the string: ")d={}for i in str: if i not in d: d[i]=1 else: d[i]+=1print(d)Q4 (a) What are dictionaries? Define keys(), values() and items() methods of dictionary.4Ans: A dictionary maps a set of objects (keys) to another set of objects (values). A Python dictionary is a mapping of unique keys to values. Dictionaries are mutable, which means they can be changed. dict.keys()Returns list of dictionary dict's keysdict.values()Returns list of dictionary dict's valuesdict.items()Returns a list of dict's (key, value) tuple pairs (b) Define Software.1Ans: Software is a collection of programs and related documentation (c) What does a bus mean?1Ans: A bus is a group of conducting lines that caries data, address and control signals between CPU and memory . (d) Write two differences between Bluetooth and infrared2 Ans:BluetoothInfrared1. Not affected by physical inferenceCommunication stops in presence ofinterference2. Range more than infraredRange less than Bluetooth3. Bluetooth does not need a direct line Infrared needs a direct line of connectionof connection (e) What is the concept of Cloud Computing?2 Ans: Cloud computing refers to storing and accessing data and programs over the internet instead of yours computer’s hard drive. The cloud is just a metaphor for the internet. To store and access program over a cloud, you need access to a cloud. There are two types of clouds 1. Public cloud (Example Google Drive, icloud, Amazon cloud Drive) 2. Private cloud( Private cloud consists of computing resources exclusively owned by one business or organization) Q5 (a) Define Operating system. Give the names of any three operating systems.2 Answer: Operating System is defined as a collection of programs that coordinates the operations of computer hardware and software. It acts as a bridge or interface between user and hardware. Operating system is a system software which is mandatory for all computer systems to operate. It is a general purpose software. Some commonly used operating systems are DOS,Windows, BOSS etc. (b) Draw XOR gate using minimum number of NAND gate. OR Convert Hexadecimal Number ( A2DE ) into its equivalent Octal Number.2 Ans: OR Hexadecimal to OctalHexadecimal =A2DEBinary =1010001011011110= 1010001011011110 binaryAdd leading zeros or remove leading zeros to group into sets of three binary digits.Binary: 1010001011011110 = 001 010 001 011 011 110Binary =001010001011011110Octal =121336= 121336 octal (c) What are the advantages of using a DBMS?2 Ans: Advantages of DBMS are:1. Reduce data redundancy (duplication of data)2. Control data inconsistency to a large extent3. Database facilitate sharing of data4. Enforce standards5. Centralized databases can ensure data security. (d) Differentiate between DDL and DML?2 Ans: DDL and DML Comparison ChartBasis for ComparisonDDL DMLBasicDDL is used to create the database schema.DML is used to populate and manipulate databaseFull FormData Definition LanguageData Manipulation LanguageClassificationDDL is not classified further.DML is further classified as Procedural and Non-Procedural mandsCREATE, ALTER, DROP, TRUNCATE AND COMMENT and RENAME, etc.SELECT, INSERT, UPDATE, DELETE, MERGE, CALL, etc. (e) A table "Animals" in a database has 3 columns and 10 records. What is the degree and cardinality of this table?2 Ans: degree = 3 cardinality = 10Q6 (a) Write the SQL command to create the following table as Deptm with constraints. Field NameField TypeConstraintDEPTNOIntegerNOT NULL PRIMARY KEYDNAMEVarchar(14)NOT NULLLOCVarchar(13)SalaryInteger(5)2 Ans: Create table Deptm (DEPTNO integer primary key, DNAME varchar(14) NOT NULL, LOC VARCHAR (14), Salary Integer(5)); 2 Marks for writing correct query. (b) Write a SQL command to add following column in above table Deptm. Column NameData TypeSizeConstraintDescriptionAddressVarchar40Address of the Person1 Ans: Alter table Deptm ADD ( Address Varchar(40)); 1 Marks for writing correct query. Write SQL Commands for the questions form (a) to (h) on the basis of table Teacher.[6 X 1M]Table : TeacherNo.NameAgeDepartmentDateojjoinSalarySex1Jugal34Computer2007-02-1012000M2Shanti31History2008-03-2420000F3Sandeep32Maths2009-02-2514000M4Sangeeta45History2007-04-1520000F5Rakesh35Computer2007-05-1721000MTo show all information about the teacher of History department in descending order of their name .To list the male teacher who are in Maths department.To display Name, Salary, Age of all male teacher.Update the Salary by increasing Rs. 1000 for female teacher.To Insert a new record in table Teacher with the following data : 9, ‘Raja’, 23, ‘Hindi’, ‘2005-08-19’,12675, ‘M’Display the name of those teacher whose name started with alphabet ‘S’;6Ans: (i) SELECT * FROM TEACHER WHERE DEPARTMENT=’History’ ORDER BY Name DESC;(ii) SELECT * FROM TEACHER WHERE DEPARTMENT=’Maths’ AND SEX=’M’;(iii) SELECT NAME, SALARY, AGE FROM TEACHER WHER SEX=’M’;(iv) UPDATE TEACHER SET SALARY= SALARY+1000 WHERE SEX=’F’;(v) INSERT INTO TEACHER VALUES (9, ‘Raja’, 23, ‘Hindi’, ‘2005-08-19’,12675, ‘M’ );(vi) SELECT Name FORM TEACHER WHERE NAME LIKE ‘S%’;1 Marks each for writing correct query.Q7 (a) What is cyber bullying .1 Ans: the use of electronic communication to bully a person, typically by sending messages of an intimidating or threatening nature. (b) Write the appropriate usage of social networks.1 Ans: Audit yourself. Before applying for any jobs, take the time and perform a personal web audit and see what information about you arises. Create a professional profile. Show and tell. Be discreet. Be proactive. (c) What is cyber safety? Why is it important?2 Ans: Cyber safety is also called as internet safety. Importance of Internet safety in between variety of information, personal data and property protection is really important. Internet safety is more important for users while accessing online banking services and shopping. The objective of this field is to limit computer crimes, especially those associated with hacking and identity theft. The field of Cyber Safety attempts to impede the threat of computer crimes through the protection of information and corruption.? (d) What Is Backup and Recovery? Is it necessary to take backup of data?2 Ans: Backup and recovery describes the process of creating and storing copies of data that can be used to protect organizations against data loss. Recovery from a backup typically involves restoring the data to the original location, or to an alternate location where it can be used in place of the lost or damaged data.A proper backup copy is stored in a separate system or medium, such as tape, from the primary data to protect against the possibility of data loss due to primary hardware or software failure. (e) Differentiate between adware and malware.2 Ans: Malware is a combination of the words “Malicious” and “Software". Its an umbrella term to describe any software that is used to cause harm or to steal/breach data. (Trojans, worms, viruses, etc.)Adware is a form of Malware that usually comes prepackaged with software that is downloaded. It will mainly cause a lot of unwanted pop-ups and unclosable windows to appear on your computer. These pop-ups often have links that will direct to harmful sites, and scams. (f) List rules for safely browsing the web2Ans: Keep Personal Information Professional and Limited. Keep Your Privacy Settings On. Make Sure Your Internet Connection is Secure. Use a firewall. Be Careful What You Download. . Choose Strong Passwords.Update your security software. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download