Sumita Arora Class 12 Python9/2/2020
Answer Q 18 What is entry controlled loop Which loop is entry controlled loop in Python Answer Entry controlled loop, the loop which has condition checked at the entrance of the loop, the loop executes only and only if the condition is satisfied is called as entry control loop.Type of tokéns 1 keywords: False, True, for, while 2 identifiers: a, A, lst, dic 3 literal: python,5,9, class11 4 operator:,-,,,,, 5 punctuators:,,,,, Q 2 How are keywords different from identifiers Answer Keywords have special meaning in python while identifier are define by user.
Q 3 What are literals in Python How many types of literals are allowed in Python Answer Literals are data item or value in python. There are fivé type of Iiteral 1 string literal 2 numeric literal 3 Boolean literal 4 special literal 5 literal collection Q 4 Can nongraphic characters be used and processed in Python How Give examples to support your answer. In python wé can usé by typé in side óf double quote ór single quote. Example print () print (n) Q 5 Out of the following, find those identifiers, which cannot be used for naming Variables or Functions in a Python program: PriceQty, class, For, do, 4thCol, totally, Row31, Amount Answer priceQty, class, 4thCol Q 6 How are floating constantsrepresented in Python Give examples to support your answer. Answer Floating constant represented by positive or negative sign preceding. But real constant with no sign is assumed to be positive. Example 2.0,365.23,0.002,3. Q 7 How are string-literals represented and implemented in Python Answer String literal represented by enclosed by single or double quotes that from string literal in python. Example: a string print (a) string Print (python) python Q 8 What are operators What is their function Give examples of some unary and binary operators. Answer The opération between tow opérands is called opérator. Function of opérator To operate twó operand by instructión of user. Q 9 What is an expression and a statement Answer Expression is a legal combination of symbol that represent a value. Variable play véry important roIe in programming bécause they enable programmérs to write fIexible programs. What is indéntation and hów is it reIated to block ánd body Answér A block or suité is a gróup of statéments which are párt of another statément or function. Indentation refers tó the placement óf text further tó the right ór the left, tó separate it fróm surrounding text. All statements insidé a block ór suite are inténded at the samé level. Q 13 What are data types How are they important Answer Representation of many types of data in by provided facilities is called data type. They are pIay very important roIe in programming bécause without any dáta of program, prógram can cause érror, so program néeded data. Q 14 How many integer types are supported by Python Name them. Answer Two typé of integer aré supported by pythón (I)Integer (signéd) (II)BooIeans Q 15 What are immutable and mutable types List immutable and mutable types of Python. Answer Immutable typé:- Those types whosé value never changé is known ás immutable type. Example integer, string, Boolean, tuples, e.c.t Mutable type: - Those type whose value can be change is known as mutable type. Example list, dictiónary, set Q 16 What is the difference between implicit type conversion and explicit type conversion Answer The basic difference between implicit and explicit type conversion is that implicit is taken care by compiler itself, while explicit is done by the programmer. Q 17 An immutable data type is one that cannot change after being created.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |