Answers8
All keywords in Python are in
a. lower case
b. UPPER CASE
c. Capitalized
d. None of the above - ANSWERS-d. None of the above
______________(str) is the function to run in the shell to find out details about how to use str()
and the type of data it accepts and returns. - ANSWERS-help
Which of the following is an invalid statement?
a. abc = 1,000,000
b. a b c = 1000 2000 3000
c. a,b,c = 1, 2, 3
d. a_b_c = 4,000,000 - ANSWERS-b. a b c = 1000 2000 3000
Which one of the following have the highest precedence in the expression?
a. Exponential
b. Addition
c. Multiplication
, d. Parentheses - ANSWERS-d. Parentheses
Following set of commands are executed in shell, what will be the output?
>>> str = "hello"
>>> str[:2]
>>> - ANSWERS-he; because you are printing only the first two bytes of string.
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 - ANSWERS-d. All of the above.
Is Python case sensitive when dealing with identifiers?
a. yes
b. no
c. it depends on context
d. it depends on data type - ANSWERS-a. yes
Which of the following is an invalid variable?
a. my_string
b. __a