[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

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

2 / 40

2. The for loop in Python is an _____________

a) Entry Controlled Loop

b) Exit Controlled Loop

c) Both of the above

d) None of the above

3 / 40

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

a. 5

b. 3

c. 6

d. 7

4 / 40

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

5 / 40

5.

Which is the correct operator for power(xy)?

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

6 / 40

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

7 / 40

7. A variable name can only contain alpha-numeric characters and
underscores

8 / 40

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

9 / 40

9. Which of the following is False regarding loops in Python?

a)Loops are used to perform certain tasks repeatedly.

b) while loop is used when multiple statements are to executed repeatedly until the given condition becomes true.

c) while loop is used when multiple statements are to executed repeatedly until the given condition becomes false.

d) for loop can be used to iterate through the elements of lists.

10 / 40

10. Comments starts with a #

11 / 40

11. Python has various versions available

12 / 40

12. Suppose t = (1, 2, 4, 3), which of the following is incorrect?
a) print(t[3])
b) t[3] = 45
c) print(max(t))
d) print(len(t))

13 / 40

13. Most recent major version of Python is Python 3

14 / 40

14. Python can be install on both  Linux and  Windows

15 / 40

15.

 What is output of: 35 == 35.0

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

16 / 40

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

17 / 40

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

18 / 40

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

19 / 40

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

20 / 40

20. With the break statement we can stop the loop before it has looped through all the items

21 / 40

21. What is the output of the given below program?

if 3 + 4 == 7:    print("Hi")else:    print("Know Program")print("Hello")

a) Hi
b) Know Program

c)
Hi
Hello

d)
Know Program
Hello

22 / 40

22.

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

23 / 40

23. Find the output of the given Python program?

a, b, c = 1, 3, 5if a > 0:  if b < 2:    print("Hi")  elif c > 3:    print("Hello")else:  print("Know Program")

a) Hi
b) Hello
c) Know Program
d) Compiled Successfully, No Output.

24 / 40

24.

What do we use to define a block of code in Python language?

  1. Key
  2. Brackets
  3. Indentation
  4. None of these

25 / 40

25. You can use the pop() method to remove an element from the array

26 / 40

26. python has two primitive loop commands:

  • while loops
  • for loops

27 / 40

27.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

28 / 40

28. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

29 / 40

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

30 / 40

30.

What will be the output of above Python code?

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

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

31 / 40

31. Which term describes a loop that continues repeating without a terminating (ending) condition?

a) Infinite Loop

b) Conditional Loop

c) Unlimited Loop

d) Sequence Loop

32 / 40

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

33 / 40

33.

In Python, a variable may be assigned a value of one type, and then later assigned a value of a different type:

  1. False
  2. True

34 / 40

34. Extension of all Python  Programme are .py

35 / 40

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

36 / 40

36.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

37 / 40

37.

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

38 / 40

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

39 / 40

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

40 / 40

40. What is the output of the given below program?

if 1 + 3 == 7:    print("Hello")else:    print("Know Program")

a) Hello
b) Know Program
c) Compiled Successfully, No Output.
d) Error

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.