{"id":3138,"date":"2022-05-10T11:59:55","date_gmt":"2022-05-10T06:29:55","guid":{"rendered":"https:\/\/cbsepython.in\/?p=3138"},"modified":"2022-05-10T11:59:55","modified_gmt":"2022-05-10T06:29:55","slug":"important-questions-python-fundamentals-class-11-computer-science","status":"publish","type":"post","link":"https:\/\/cbsepython.in\/important-questions-python-fundamentals-class-11-computer-science\/","title":{"rendered":"Important Questions Python Fundamentals Class 11 Computer Science"},"content":{"rendered":"<h1><span style=\"color: #000000;\">Important Questions Python Fundamentals Class 11 Computer Science<\/span><\/h1>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #000000;\">Very Short answer Type Questions<\/span><\/h2>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>Q.1 What is None literal in Python?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Ans: Python has one special literal, which is None. The None literal is used to indicate absence of value. It is also used to indicate the end of lists in Python. It means \u2015There is nothing here\u2016.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>Q.2 What is the error in following code: x, y =7 ?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Ans: The following error comes &#8211; &#8216;int&#8217; object is not iterable. Which means an integer object i.e. cannot be repeated for x and y. one more integer object is required after 7.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>Q.3 what will the following code do: a=b=18 ?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Ans: This code will assign 18 to a and b both.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #000000;\">Short Answer Type Questions<\/span><\/h2>\n<p><strong><span style=\"color: #000000;\">Q.1 What is the difference between a keyword and an identifier?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Ans: Difference between Keyword and Identifier: Every language has keywords and identifiers, which are only understood by its compiler. Keywords are predefined reserved words, which possess special meaning. An identifier is a unique name given to a particular variable, function or label of class in the program.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">Q.2 What are literals in Python? How many types of Literals allowed in Python?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Ans: Literals: Python comes with some built-in objects. Some are used so often that Python has a quick way to make these objects, called literals.<\/span><br \/>\n<span style=\"color: #000000;\">The literals include the string, Unicode string, integer, float, long, list, tuple and dictionary types.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">Q.3 How many types of sequences are supported in Python?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Ans: Three Types of Sequences are supported in python:<\/span><br \/>\n<span style=\"color: #000000;\">(i) String<\/span><br \/>\n<span style=\"color: #000000;\">(ii) List<\/span><br \/>\n<span style=\"color: #000000;\">(iii) Tuple<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">Q.4 What factors guide the choice of identifiers in program?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Ans: (i) An identifier must start with a letter or underscore followed by any number of digits and\/or letters.<\/span><\/p>\n<p><span style=\"color: #000000;\">(ii) No reserved word or standard identifier should be used.<\/span><\/p>\n<p><span style=\"color: #000000;\">(iii) No special character (Other than underscore) should be included in the identifier.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>Q.5 What is the difference between an expression and a statement in Python?<\/strong> <\/span><\/p>\n<p><span style=\"color: #000000;\">Ans: A statement is an instruction that the Python interpreter can execute. We have only seen the assignment statement so far. Some other kinds of statements that we\u2018ll see shortly are while statements, for statements, if statements, and import statements.<\/span><\/p>\n<p><span style=\"color: #000000;\">An expression is a combination of values, variables, operators, and calls to functions. Expressions need to be evaluated. If you ask Python to print an expression, the interpreter evaluates the expression and displays the result.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>Q.6 What are tokens in Python? How many types of tokens allowed in Python?<\/strong> <\/span><\/p>\n<p><span style=\"color: #000000;\">Ans: Tokens are the smallest unit of the program. There are following tokens in Python:<\/span><\/p>\n<p><span style=\"color: #000000;\">i) Reserved words or Keywords<\/span><\/p>\n<p><span style=\"color: #000000;\">ii) Identifiers<\/span><\/p>\n<p><span style=\"color: #000000;\">iii) Literals Definition of all tokens may come. Which is not given<\/span><\/p>\n<p><span style=\"color: #000000;\">iv) Operators in this question bank.<\/span><\/p>\n<p><span style=\"color: #000000;\">v) Punctuators<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">Q.7 What are operators? What is their function? Give examples of some unary and binary operators.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Ans: \u201cOperators are those symbols used with operands, which tells compiler which operation is to be done on operands. In other words \u2013 \u2015operators are tokens that trigger some computation\/action when applied to variables and other objects in an expression.<\/span><br \/>\n<span style=\"color: #000000;\">Operators are of following types:<\/span><\/p>\n<p><span style=\"color: #000000;\">i) Unary operators like (+) Unary Plus, (-) Unary Minus, not etc.<\/span><\/p>\n<p><span style=\"color: #000000;\">ii) Binary Operators like (+) addition, (*) multiplication, and etc.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">Q.8 What is the role of indentation in Python?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Ans: Indentation plays a very important role in Python. Python uses indentation to create blocks of code. Statements at same indentation level are part of same block\/suit. You cannot unnecessarily indent a statement; python will raise an error for that.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">Q.9 How many types of strings are supported by Python?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Ans: Python supports two types of strings:<\/span><\/p>\n<p><span style=\"color: #000000;\">(i) Single-line string That terminates in single line.<\/span><\/p>\n<p><span style=\"color: #000000;\">(ii) Multi-line String That stores multiple lines of text.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Important Questions Python Fundamentals Class 11 Computer Science &nbsp; Very Short answer Type Questions &nbsp; Q.1 What is None literal in Python? Ans: Python has one special literal, which is None. The None literal is used to indicate absence of value. It is also used to indicate the end of lists in Python. It means [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,20],"tags":[],"class_list":["post-3138","post","type-post","status-publish","format-standard","hentry","category-cbse-sample-papers-class-11","category-cbse-computer-science-with-python-class-12"],"_links":{"self":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts\/3138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/comments?post=3138"}],"version-history":[{"count":0,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts\/3138\/revisions"}],"wp:attachment":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/media?parent=3138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/categories?post=3138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/tags?post=3138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}