Thursday, November 23, 2023

QUIZ: CHAPTER 1- LEARN DATATYPES IN PYTHON


To practice the QUIZ, click or copy and paste the link in the new browser tab. 

https://forms.gle/ttzbq1GZSUjFewt49 

 1. A group of letters from the source character set that are encased in double       quotation marks is known as a ________________

a)string word

b)string literal

c)string object

d)string datatype

2. Literal refers to _______________and other values passed to variables. 

a)numbers

b)strings

c)characters

d)All the above

3. Variables are the memory locations where literals were saved.

a)TRUE

b)FALSE

4. What is the output for this code: 

     [In]Janu_word=“Today” + “any”

     [In]Janu_word

a)Today+any

b)Todayany

c)Today  any

d)todayany

5. What is the output for this code: 

      [In] waterperplant="1.5"

      [In]waterperplant

      [Out]1.5

      [In]type(waterperplant)

a)string

b)integer

c)float

d)boolean

6. Does Janavi have work today? or not.  The anwer can be identified as datatype of ‘__________’.

a)string

b)integer

c)float

d)boolean

7. Square brackets can access string components.

    import array as arr

    numbersinstory=(1,4,6,"plant")

    print(numbersinstory[0])

    The output for the above shown code:

a)4

b)1

c)6

d)plant

8. Lists are used to hold several elements in a single variable.

a)True

b)False

9. KEY and VALUES are mutually connected at least with one pair. Example: Mom                   assigned 1 task, bought 4 plants and asked to pour 1.5 liters of water per plant. Find the         right form for dictionary datatype.

a)event=['task':1, 'plant':4, 'waterperplant':1.5]

b)event=('task':1, 'plant':4, 'waterperplant':1.5)

c)event={'task':1, 'plant':4, 'waterperplant':1.5}

d)none of all

10.  The data in 'set' datatype is unsorted, unchangeable, and cannot be indexed.

a)True

b)False

No comments:

Post a Comment

CHAPTER 18 EXPLORING THERMODYNAMICS WITH PYTHON: UNDERSTANDING CARNOT'S THEOREM AND MORE

  Python is a versatile programming language that can be used to simulate and analyze various physical phenomena, including thermal physics ...