Breaking News

fresco play answers python program 3

 Which of these are salient features of Python, except? limited platform support

Code written in Python 3 is backward compatible with Python 2.   False

Python is Ubiquitous? Is this true or false?     True

Which is the fastest implementation of Python?    Pypy

The 2 main versions of Python include -   Python 2.x & 3.x

Python supports automatic garbage collection.    True

Which of the following attributes shows the characteristics of Python? Python is everywhere (Webscripting, 3D Modelling , Games , and Desktop applications ).   Ubiquity

 

When using the Python shell and code block, what triggers the interpreter to begin evaluating block of code?    blankline

While using Python IDLE, by how many space are the code suites indented?   4

Which action should be avoided so that you do not mistakenly overwrite names that you have already defined?    Use wildcard import

What command is used to output text from both the Python shell and within a Python module?   Print()

What is the output of bool(0)?     False

While using 'bool', all zero values are considered as false and non- zero values are considered as true. Is this correct?   True

Which statement accurately defines the bool class?   
Boolean Not returns False if the operand is True

Which of the following will not result in declaring x as datatype of float? x=5

Which statement correctly assigns X as an infinite number? x=float('inf')

Which datatype is represented by int in Python 3?    long

The bool class is subset of .  int

Is x,y=5,6 a valid statement?  True

 

What is the output of max('Infinity')?      Y

What is the output of min('Infinity')?    f

Which of these could be used in tuple object   Sorted, Lens , Max

Byte datatype can contain only and .   ascii & hexadecimal characters

bytearray provides an mutable sequence (making it modifiable)  true

Values in bytearray should be integers between  0-255

Using Pop in list will remove the popped up item.  True

While using slicing in lists, list[0:2] is equivalent to .   list[:2]

Which describes bytearrays? Without an argument , array of size 0 is created , contain a sequence of integers 0-255  

Which statement creates the bytes literal when run? bytes_literal = b'Copyright \xc2\xa9'

Which statements prevent the escape sequence interpretation?  r'col\tcol2\tcol3\t'

Empty list could be created with list() alone.   False

Which methods can be used with list objects?  Reverse , Pop , Clear

The class which provides immutable sequence of elements   tuple

Which statements will result in slice of tuple?   atuple[::2] atuple[:]

 

All of these range types are correct except ___.   
range(20,40,-2)

Dictionary could be copied to another dictionary using which of following syntax?   dicta=dictb.copy()


Empty dictionary is represented as .{}

a.symmetricdifference(b) highlights the _.   a.union(b) - a.intersection(b)

a.difference(b) highlights the .a - b

Consider b is frozen set, what happen to b.add(3)?   Error as frozen sets cannot be modified

 

What is the output of the following code? for x in (1,10,100): print (x) 1 10 100

a = 0 if a: print("a's value") else: print("Sorry nothing will get printed")Sorry nothing will get printed

What is the output of the following code count = 0 while count < 2: print (count, " is less than 2") count = count + 2 else: print (count, " is not less than 2") 0 is less than 2; 2 is not less than 2

What is the output of below code snippet - for char in 'Welcome': print (char, end='*') print()    W*e*l*c*o*m*e*

 

 

Final:

 

1. Which statement accurately defines the bool class? Boolean Not returns False if the operand is True

2. Which of the following attributes shows the characteristics of Python? Python is everywhere (Webscripting, 3D Modelling , Games , and Desktop applications ).   Ubiquity

3. While using slicing in lists, list[0:2] is equivalent to . list[:2]

4. What is the output of max('Infinity')?   Y

5. Which of these methods can be used with list objects, except ? Decode, Lambda

6. The class which provides immutable sequence of elements   tuple

7. Using Pop in list will remove the popped up item.   True

8. In what format does the input function read the user input ? array is wrong

9. Which of the following will not result in declaring x as datatype of float?  X=5

10. What is the output of the following code? for x in (1,10,100) print (x)  1 10 100  is wrong

11. What is the output of the following code? a = 0 if a: print(""a's value"") else: print(""Sorry nothing will get printed"")

Sorry nothing will get printed

12. While using 'bool', all zero values are considered as false and non- zero values are considered as true. Is this correct? True

13. The bool class is subset of .  int

14. What command is used to output text from both the Python shell and within a Python module?   Print()

15. Bitwise operators cannot be used on the float type  true

 

 

No comments