Python Variables November 4, 2020March 21, 2021wefru python online python online programming Python in that python variable quiz we have discussed in this section how to declaring variable, casting , Get the type and single or double quote. 14 Created on September 30, 2020 By wefru Python-variables Python-variables 1 / 12 10. Why are local variable names beginning with an underscore discouraged? A. they confuse the interpreter B. they are used to indicate a private variables of a class C. they are used to indicate global variables D. they slow down execution 2 / 12 9. Which of the following is a valid variable? A. var@ B. 32var C. class D. abc_a_c 3 / 12 8. Which of the following statement is False? A. Variable names can be arbitrarily long. B. They can contain both letters and numbers. C. Variable name can begin with underscore. D. Variable name can begin with number. 4 / 12 7. All keyword in python are in A. Lowercase B. Uppercase C. Both uppercase & Lowercase D. None of the above 5 / 12 How many keywords are there in python 3.7 32 31 30 33 6 / 12 What is the maximum length of an identifier in python? 32 31 63 None of these 7 / 12 All keyword in python are in A. Lowercase B. Uppercase C. Both uppercase & Lowercase D. None of the above 8 / 12 Which of the following will give error? A. a=b=c=1 B. a,b,c=1 C. a,b,c=1 D. None of the above 9 / 12 3. Which of the following is incorrect regarding variables in Python? A. Variable names in Python cannot start with number. However, it can contain number in any other position of variable name. B. Variable names can start with an underscore. C. Data type of variable names should not be declared D. None of the above 10 / 12 2. Which of the following is not valid variable name in Python? A. _var B. var_name C. var11 D. 11var 11 / 12 1. Which one of the following is correct way of declaring and initializing a variable, x with value 5? A. int x x=5 B. int x=5 C. x=5 D. declare x=5 12 / 12 In Python, a variable must be declared before it is assigned a value: False True Your score is The average score is 44% LinkedIn Facebook Twitter VKontakte 0% Restart quiz
2 thoughts on “Python Variables”