[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2.

What is the data type of print(type(0xFF))

3 / 40

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

4 / 40

4.

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

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

5 / 40

5.

What will be the output of below Python code?

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

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

6 / 40

6. You can return a range of characters by using the slice syntax

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.

Which of the following precedence order is correct in Python?

  1. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
  2. Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
  3. Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
  4. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

9 / 40

9.

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

a. Define

b. DEF

c. def

d. Def

10 / 40

10. 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()

 

11 / 40

11. Who developed Python Programming Language?

12 / 40

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

13 / 40

13.

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

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

14 / 40

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

15 / 40

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

16 / 40

16.

Which function overloads the >> operator?

  1. more()
  2. gt()
  3. ge()
  4. None of the above

17 / 40

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

a) for

b) while

c) Both (a) and (b)

d) None of the above

18 / 40

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

19 / 40

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

20 / 40

20.

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

21 / 40

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

22 / 40

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

23 / 40

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

24 / 40

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

25 / 40

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

26 / 40

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

27 / 40

27. python file can also run on command line

28 / 40

28. Camel Case
Each word, except the first, starts with a capital letter:

29 / 40

29. Python can connect to database systems.

30 / 40

30. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

31 / 40

31. Most recent major version of Python is Python 3

32 / 40

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

33 / 40

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

34 / 40

34. Extension of all Python  Programme are .py

35 / 40

35. Find the output of the given Python program?

a = 25if a < 15:    print("Hi")if a <= 30:    print("Hello")else:    print("Know Program")

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

36 / 40

36.

 What is output of: 35 == 35.0

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

37 / 40

37.

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.

38 / 40

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

39 / 40

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

40 / 40

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

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.