[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

2 / 40

2. The for loop does not require an indexing variable to set beforehand

3 / 40

3.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

4 / 40

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

5 / 40

5. Extension of all Python  Programme are .py

6 / 40

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

7 / 40

7.

Which is the correct operator for power(xy)?

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

8 / 40

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

9 / 40

9.

What will be the output of below Python code?

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

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

10 / 40

10. Comments starts with a #

11 / 40

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

12 / 40

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

13 / 40

13.

Which of the following statements assigns the value 25 to the variable x in Python:

  1. x ← 25
  2. x = 25
  3. x := 25
  4. int x = 25
  5. x << 25

14 / 40

14.

 What is output of: 35 == 35.0

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

15 / 40

15.

 Select the correct example of complex datatype in Python

  1. 3 + 2j
  2. -100j
  3. 5j
  4. All of the above are correct

16 / 40

16. The elif keyword is pythons way of saying “if the previous conditions were not true, then try this condition”.

17 / 40

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

18 / 40

18.

 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.

19 / 40

19. Which of the following character is used to give single-line comments in Python?
a) //
b) #
c) !
d) /*

20 / 40

20. python file can also run on command line

21 / 40

21. python has two primitive loop commands:

  • while loops
  • for loops

22 / 40

22. A variable name cannot start with a number

23 / 40

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

24 / 40

24.

Function defined to achieve some task as per the programmer’s requirement is called a ___________

a. user defined function

b. library function

c. built in functions

d. All of the above.

25 / 40

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

26 / 40

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

27 / 40

27. During Installation Make sure to select both the checkboxes at the bottom .

28 / 40

28.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

29 / 40

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

30 / 40

30.

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

a. 2

b. 3

c. 5

d. Multiple times

31 / 40

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

32 / 40

32. Comments can’t be used to prevent execution when testing code.

33 / 40

33.

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

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

34 / 40

34.

What is the value of the expression 100 / 25?

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

35 / 40

35.

 ____________________ can be defined as a named group of instructions that accomplish a specific task when it is invoked/called.

a. Function

b. Datatype

c. Token

d. Operator

36 / 40

36. Python is a  high-level programming language.

37 / 40

37.

Which keyword is used to begin the definition of a function?

a. Define

b. DEF

c. def

d. Def

38 / 40

38. Python can be install on both  Linux and  Windows

39 / 40

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

40 / 40

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

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.