Study Set 1

¡Supera tus tareas y exámenes ahora con Quizwiz!

Which of the following environment variable for Python contains the path of an initialization file containing Python source code? A - PYTHONPATH B - PYTHONSTARTUP C - PYTHONCASEOK D - PYTHONHOME

B

What is the output of print list[1:3] if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]? A - [ 'abcd', 786 , 2.23, 'john', 70.2 ] B - abcd C - [786, 2.23] D - None of the above.

C

What is the output of print str[2:5] if str = 'Hello World!'? A - llo World! B - H C - llo D - None of the above.

C

What is the output of print tuple[1:3] if tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 )? A - ( 'abcd', 786 , 2.23, 'john', 70.2 ) B - abcd C - (786, 2.23) D - None of the above.

C

Which of the following data types is not supported in python? A - Tuple B - Dictionary C - Generics D - List

C

Which of the following is correct about Python? A - It supports automatic garbage collection. B - It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java. C - Both of the above. D - None of the above.

C

What is the output of print tinylist * 2 if tinylist = [123, 'john']? A - [123, 'john', 123, 'john'] B - [123, 'john'] * 2 C - Error D - None of the above.

A

Which of the following environment variable for Python tells the Python interpreter where to locate the module files imported into a program? A - PYTHONPATH B - PYTHONSTARTUP C - PYTHONCASEOK D - PYTHONHOME

A

Is python a case sensitive language? A - true B - false

A

What is the output of print list if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]? A - [ 'abcd', 786 , 2.23, 'john', 70.2 ] B - list C - Error D - None of the above.

A

What is the output of print list if tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 )? A - ( 'abcd', 786 , 2.23, 'john', 70.2 ) B - tuple C - Error D - None of the above.

A

What is the output of print str * 2 if str = 'Hello World!'? A - Hello World!Hello World! B - Hello World! * 2 C - Hello World! D - None of the above.

A

What is the output of print str if str = 'Hello World!'? A - Hello World! B - Error C - str D - None of the above.

A

What is the output of print str[2:] if str = 'Hello World!'? A - llo World! B - H C - llo D - None of the above.

A

What is the output of print list[2:] if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]? A - [ 'abcd', 786 , 2.23, 'john', 70.2 ] B - abcd C - [786, 2.23] D - [2.23, 'john', 70.2]

D

Which of the following data types is not supported in python? A - Numbers B - String C - List D - Slice

D

Which of the following is correct about Python? A - It supports functional and structured programming methods as well as OOP. B - It can be used as a scripting language or can be compiled to byte-code for building large applications. C - It provides very high-level dynamic data types and supports dynamic type checking. D - All of the above.

D

Which of the following is correct about Python? A - Python is a high-level, interpreted, interactive and object-oriented scripting language. B - Python is designed to be highly readable. C - It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical constructions than other languages. D - All of the above.

D

Which of the following is correct about tuples in python? A - A tuple is another sequence data type that is similar to the list. B - A tuple consists of a number of values separated by commas. C - Unlike lists, however, tuples are enclosed within parentheses. D - All of the above.

D


Conjuntos de estudio relacionados

Geometry Postulates Always, Sometimes, Never

View Set

Translating Words Into Expressions and Equations

View Set

Building Construction Chp. 21 quiz questions

View Set

International Management Chapter 15

View Set