[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

2 / 40

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

3 / 40

3. Python can be install on both  Linux and  Windows

4 / 40

4.

 What is output of: 35 == 35.0

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

5 / 40

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

6 / 40

6. X wants to allow the program to repeatedly ask the user to enter their Choice if it does not equal the Answer. Which loop option should X use?

a) while Choice == Answer:

Choice = input()

b) while Choice != Answer:

Choice = input()

c) while Answer != Choice:

Choice = input()

d) while Answer =! Choice:

Choice = input()

 

7 / 40

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

8 / 40

8. An example of an illegal character is a double quote inside a string that is surrounded by double quotes

9 / 40

9.

What will be the output of above Python code?

str1="6/4"print("str1")

A. 1
B. 6/4
C. 1.5
D. str1

10 / 40

10.

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

11 / 40

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

12 / 40

12. Python has various versions available

13 / 40

13. An array is a special variable, which can hold more than one value at a time

14 / 40

14. Which of the following is used to define a block of code in Python language?
a) Indentation
b) Key
c) Brackets
d) All of the mentioned

15 / 40

15.

The function can be called in the program by writing function name followed by ____

a. [ ]

b. { }

c. ( )

d. None of the above

16 / 40

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

17 / 40

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

18 / 40

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

19 / 40

19.

Which is the correct operator for power(xy)?

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

20 / 40

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

21 / 40

21.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

22 / 40

22. Python is a  high-level programming language.

23 / 40

23. Python can connect to database systems.

24 / 40

24. python has two primitive loop commands:

  • while loops
  • for loops

25 / 40

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

26 / 40

26. Who developed Python Programming Language?

27 / 40

27. Variables that are created outside of a function

28 / 40

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

a) for

b) while

c) Both (a) and (b)

d) None of the above

29 / 40

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

30 / 40

30. A variable name cannot start with a number

31 / 40

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

32 / 40

32. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

33 / 40

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

34 / 40

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

35 / 40

35.

Which of the following is not a keyword in Python language?

  1. val
  2. raise
  3. try
  4. with

36 / 40

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

37 / 40

37.

How to copy one list to another in python?

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

38 / 40

38. The else keyword catches anything which isn’t caught by the preceding conditions.

39 / 40

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

40 / 40

40. Can we write if/else into one line in python?

a) Yes
b) No
c) if/else not used in python
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.