[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2. What keyword would you use to add an alternative condition to an if statement?

a) else if
b) elseif
c) elif
d) None of the above

3 / 40

3. The len() method to return the length of an array

4 / 40

4. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

5 / 40

5. Official site of python is www.python.org

6 / 40

6.

What will be the output of below Python code?

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

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

7 / 40

7. Pip is  not a powerful package management system for Python software packages

8 / 40

8. Comparison operators are not  used to compare two values

9 / 40

9. Comments starts with a #

10 / 40

10. What will be the output of the following Python code?

i = 1while True:    if i%3 == 0:        break    print(i)     i + = 1

a) 1 2
b) 1 2 3
c) error
d) none of the mentioned

11 / 40

11.

What will be the output of below Python code?

str1="poWer"str1.upper()print(str1)

A. POWER
B. Power
C. power
D. poWer

12 / 40

12. Indentation refers to the spaces at the beginning of a code line.

13 / 40

13. We can combine strings and numbers by using the format() method

14 / 40

14. You can return a range of characters by using the slice syntax

15 / 40

15.

 What is output of: 35 == 35.0

  1. False
  2. True
  3. 33
  4. None of the above

16 / 40

16. What is the index value of ‘i’ in string “Learning”

a. 5

b. 3

c. 6

d. 7

17 / 40

17. Snake Case
Each word is separated by an underscore character:

18 / 40

18. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

19 / 40

19. Operators are used to perform operations on variables and values

20 / 40

20. Python will give you an error if you skip the indentation

21 / 40

21. Python relies on indentation?

22 / 40

22. The format() method takes unlimited number of arguments

23 / 40

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

24 / 40

24.

Python considered the character enclosed in triple quotes as String.(T/F)

a. True

b. False

25 / 40

25.

Which one of the following is the correct extension of the Python file?

  1. .py
  2. .python
  3. .p
  4. None of these

26 / 40

26.

Which is the correct operator for power(xy)?

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

27 / 40

27. Bitwise operators are used to compare (binary) numbers

28 / 40

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

29 / 40

29.

What is the value of the expression 100 / 25?

  1. 4
  2. 4.0
  3. 0
  4. 25

30 / 40

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

31 / 40

31. Variable names are case-sensitive

32 / 40

32. Which of the following loop is not supported by the python programming language?

a) for loop

b) while loop

c) do…while loop

d) None of the above

33 / 40

33. You have to use the same number of spaces in the same block of code, otherwise Python will give you an error

34 / 40

34. Identity operators are used to compare the objects, not if they are equal, but if they are actually the same object, with the same memory location

35 / 40

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

36 / 40

36. You can also have an else without the elif

37 / 40

37. You can have if statements inside if statements, this is called nested if statements.

38 / 40

38.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

39 / 40

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

40 / 40

40. Python can be used to handle big data and perform complex mathematics.

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.