[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2. An array can hold many values under a single name

3 / 40

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

4 / 40

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

5 / 40

5.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

6 / 40

6.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

7 / 40

7. Who developed Python Programming Language?

8 / 40

8.

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

9 / 40

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

10 / 40

10. You can use three double quotes only:

a = “””Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.”””
print(a)

11 / 40

11.

 ____________________ 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

12 / 40

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

13 / 40

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

14 / 40

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

15 / 40

15. Python can be install on both  Linux and  Windows

16 / 40

16.

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

17 / 40

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

18 / 40

18.

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

19 / 40

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

20 / 40

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

21 / 40

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

22 / 40

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

23 / 40

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

24 / 40

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

25 / 40

25. Pascal Case
Each word starts with a capital letter:

26 / 40

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

a. 5

b. 3

c. 6

d. 7

27 / 40

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

28 / 40

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

29 / 40

29.

What will be the output of below Python code?

tupl=([2,3],"abc",0,9)tupl[0][1]=1print(tupl)A. ([2,3],"abc",0,9)B. ([1,3],"abc",0,9)C. ([2,1],"abc",0,9)D. Error

30 / 40

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

31 / 40

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

32 / 40

32.

The most important object defined in NumPy is an N-dimensional array type called?

A. ndarray
B. narray
C. nd_array
D. darray

33 / 40

33. Extension of all Python  Programme are .py

34 / 40

34. Comments can be used to explain Python code.

35 / 40

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

36 / 40

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

37 / 40

37.

What will be the output of below Python code?

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

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

38 / 40

38.

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

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

39 / 40

39.

 What is output of: 35 == 35.0

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

40 / 40

40. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

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.