Python Revision tour - 1 || Type A  || Sumita Arora || Class 12 || Computer science || Information practices || Solution || 

 

 

 

Q 1 = What are tokens in Python ? How many types of tokens are allowed in Python ? Exemplify your answer. Answer =  token are smallest individual unit in a program .


Q 2 = How are keywords different from identifiers ?  

  

Q 3 = What are literals in Python ? How many types of literals are allowed in Python ? 


Q 4 = Can nongraphic characters be used and processed in Python ? How ? Give examples to support your answer.



Q 5 = Out of the following, find those identifiers, which cannot be used for naming Variables or Functions in a Python program : Price*Qty, class, For, do, 4thCol, totally, Row31, _Amount  

 

Q 6 = How are floating constantsrepresented in Python ? Give examples to support your answer.





Q 8 = What are operators ? What is their function ? Give examples of some unary and binary operators.


Q 9 = What is an expression and a statement ?

Q 10 = What all components can a Python program contain ?


Q 11 = What are variables ? How are they important for a program ?


Q 12 = Describe the concepts of block and body. What is indentation and how is it related to block and body ?




Q 13 = What are data types ? How are they important ?



Q 14 = How many integer types are supported by Python ? Name them.



Q 15 = What are immutable and mutable types ? List immutable and mutable types of Python.



Q 16 = What is the difference between implicit type conversion and explicit type conversion ?



Q 17 = An immutable data type is one that cannot change after being created. Give three reasons to use immutable data.


Q 18 = What is entry controlled loop ? Which loop is entry controlled loop in Python ?



Q 19 = Explain the use of the pass statement. Illustrate it with an example.


Q 20 = Below are seven segments of code, each with a part colored . Indicate the data type of each colored part by choosing the correct type of data from the following type. (a) int (b) float (c) bool (d) str (e) function (f) list of int (g) list of str(i) if temp < 32 :     print("Freezirg")(ii) L = [ 'Hiya', 'Zoya', Preet' ] print(L[1])(iii) M = [ ] for i in range (3) : M. append (i) print(M)(iv)L = [ 'Hiya', 'Zoya', 'Preet' ] n = len (L) if ‘Donald’ in L[1: n] : print (L) (i2)v) if n% 2 == 0 : print("Freezing") (vi) L = inputline.split() while L != ( ) :     print (L)L = L[1:](vii) L= [ 'Hiya', Zoya', 'Preet' ] print (L[0] + L[1] ) 

22 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Bhai solutions kahan hai...

    ReplyDelete
    Replies
    1. Please click on question to get solutions of that question.

      Delete
  2. thank you bhaiyaaa jisne bhi publish kiya hai :) lobe you

    ReplyDelete
  3. Dhanyawaad aapka : )

    ReplyDelete
  4. Thanks Guys You helpmed me a lot in my exam for CS. You r kindly requested to like publish the notes of chapters so that we dont have to read every line of hte book. It would be a lot helpfull. Btw Thanks for these solutions :)

    ReplyDelete
  5. thank you for this. however is it possible to display the answers right below the question rather than having to click the link for every question to get the answers?

    ReplyDelete
  6. Thankyou for helping us in exam time

    ReplyDelete
  7. All are good but you can give the solution directly below so its easier

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post