[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. When does the else statement written after loop executes?

a) When loop condition becomes false

b) When break statement is executed in the loop

c) else statement is always executed

d) None of the above

2 / 40

2.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

3 / 40

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

4 / 40

4. Which of the following is the correct extension of the Python file?

5 / 40

5.

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

6 / 40

6. Most recent major version of Python is Python 3

7 / 40

7. Python is a  high-level programming language.

8 / 40

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

9 / 40

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

10 / 40

10.

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

11 / 40

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

12 / 40

12. python has two primitive loop commands:

  • while loops
  • for loops

13 / 40

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

14 / 40

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

15 / 40

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

16 / 40

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

17 / 40

17. Comments can be used to explain Python code.

18 / 40

18. Which of the following is the use of function in python?
a) Functions are reusable pieces of programs
b) Functions don’t provide better modularity for your application
c) you can’t also create your own functions
d) All of the mentioned

19 / 40

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

20 / 40

20.

What will the below Python code will return?

If str1="save paper,save plants"str1.find("save")

A. It returns the first index position of the first occurance of “save” in the given string str1.
B. It returns the last index position of the last occurance of “save” in the given string str1.
C. It returns the last index position of the first occurance of “save” in the given string str1.
D. It returns the first index position of the first occurance of “save” in the given string str1.

21 / 40

21. A variable name cannot start with a number

22 / 40

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

23 / 40

23.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

24 / 40

24.

In a program, a function can be called ____________ times.

a. 2

b. 3

c. 5

d. Multiple times

25 / 40

25. Extension of all Python  Programme are .py

26 / 40

26.

What will be the output of below Python code?

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

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

27 / 40

27. The format() method takes the passed arguments

28 / 40

28. if statements cannot be empty, but if you for some reason have an if statement with no content, put in the pass statement to avoid getting an error

29 / 40

29.

Which statement is correct?

A. List is immutable && Tuple is mutable
B. List is mutable && Tuple is immutable
C. Both are Mutable.
D. Both are Immutable

30 / 40

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

31 / 40

31.

What is the value of the expression 100 / 25?

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

32 / 40

32.  ________ in Python is a counter-controlled loop.

a) for

b) while

c) Both (a) and (b)

d) None of the above

33 / 40

33. 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

34 / 40

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

35 / 40

35.

How to copy one list to another in python?

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

36 / 40

36. Comments can be used to make the code more readable.

37 / 40

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

38 / 40

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

39 / 40

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

40 / 40

40. Which keyword is used for function?
a) Fun
b) Define
c) Def
d) Function

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.