[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. Python allows you to extract the values into variables.

2 / 40

2. All keywords in Python are in _________
a) Capitalized
b) lower case
c) UPPER CASE
d) None of the mentioned

3 / 40

3.

In the Python statement x = a + 5 – b:

a and b are ________a + 5 - b is ________
  1. terms, a group
  2. operators, a statement
  3. operands, an expression
  4. operands, an equation

4 / 40

4.

 Which of the following statement is False?

  1. Variable names can be arbitrarily long.
  2. They can contain both letters and numbers.
  3. Variable name can begin with underscore.
  4. Variable name can begin with number.

5 / 40

5.

Which is the correct operator for power(xy)?

  1. X^y
  2. X**y
  3. X^^y
  4. None of the mentioned

6 / 40

6. Python can be treated in a procedural way, an object-oriented way or a functional way.

7 / 40

7. Python has various versions available

8 / 40

8.

What do we use to define a block of code in Python language?

  1. Key
  2. Brackets
  3. Indentation
  4. None of these

9 / 40

9.

How to copy one list to another in python?

A. l1[] = l2[]
B. l1[] = l2
C. l1[] = l2[:]
D. l1 = l2

10 / 40

10. Python  was created by Guido van Rossum, and released in 1999.

11 / 40

11. Is Python code compiled or interpreted?
a) Python code is both compiled and interpreted
b) Python code is neither compiled nor interpreted
c) Python code is only compiled
d) Python code is only interpreted

12 / 40

12. + operator is used  to get output of multiple variables

13 / 40

13.

What is the data type of print(type(10))

14 / 40

14.

Which of the following precedence order is correct in Python?

  1. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
  2. Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
  3. Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
  4. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

15 / 40

15. With the for loop we can execute a set of statements

16 / 40

16. Comparison operators are not  used to compare two values

17 / 40

17.

l = [ 4, 8, 9, 2.6, 5 ] is a type of which data type in python?

  1. List
  2. Tuple
  3. Set
  4. None of these

18 / 40

18. A variable name must start with a letter or the underscore character

19 / 40

19. You can also have multiple else statements on the same line:

20 / 40

20. To write and execute code in python, we first need to install Python on our system

21 / 40

21. You can also use the remove() method to remove an element from the array

22 / 40

22. With the break statement we can stop the loop even if the while condition is true

23 / 40

23. Strings in python are surrounded by either single quotation marks, or double quotation marks

24 / 40

24. Arrays are used to store multiple values in one single variable.

25 / 40

25. Arithmetic operators are used with numeric values to perform common mathematical operations

26 / 40

26. A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

27 / 40

27. Python can be used on a server to create web applications?

28 / 40

28.

Which function overloads the >> operator?

  1. more()
  2. gt()
  3. ge()
  4. None of the above

29 / 40

29. python has two primitive loop commands:

  • while loops
  • for loops

30 / 40

30. Which of the following is a Python tuple?
a) [1, 2, 3]
b) (1, 2, 3)
c) {1, 2, 3}
d) {}

31 / 40

31. The length of an array is always one more than the highest array index.

32 / 40

32.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

33 / 40

33.

Which of the following statement will execute in last?

def s(n1): #Statement 1      print(n1) #Statement 2n2=4 #Statement 3s(n2) #Statement 4

a. Statement 1

b. Statement 2

c. Statement 3

d. Statement 4

34 / 40

34. Python can connect to database systems.

35 / 40

35. Python has a set of built-in methods that you can use on lists/arrays

36 / 40

36. print() function is often used to output variables.

37 / 40

37. The format() method takes the passed arguments

38 / 40

38.

What will be the output of below Python code?

str1="Information"print(str1[2:8])

A. format
B. formatio
C. orma
D. ormat

39 / 40

39. Python has syntax that allows developers to write programs with fewer lines than some other programming languages.

40 / 40

40.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

Exit



[hurrytimer id=”2250″]
[wooct_product]

Wrong shortcode initialized


You must log in to see your results.



Wrong shortcode initialized


There are no questions atteched yet.





[ays_quiz_leaderboard id=”Your_Quiz_ID” from=”Y-m-d H:i:sa” to=”Y-m-d H:i:s”]

Category:


Wrong shortcode initialized


[WATU 1]

You must log in to see your results.