[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2. Who developed Python Programming Language?

3 / 40

3. break in Python is used ______________

a) To restart a loop

b) Terminate a loop

c) To jump in between the loop

d) None of the above

4 / 40

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

5 / 40

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

6 / 40

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

7 / 40

7. python file can also run on command line

8 / 40

8. You can use the append() method to add an element to an array

9 / 40

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

10 / 40

10.

Which is the correct operator for power(xy)?

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

11 / 40

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

12 / 40

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

13 / 40

13. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

14 / 40

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

15 / 40

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

16 / 40

16. The list’s remove() method only removes the first occurrence of the specified value.

17 / 40

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

18 / 40

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

19 / 40

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

20 / 40

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

21 / 40

21. Which of the following loop is not supported by the python programming language?

a) for loop

b) while loop

c) do…while loop

d) None of the above

22 / 40

22.

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

23 / 40

23.

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

24 / 40

24. Is there any comments in  following codes

i = 1while True:    if i%3 == 0:        break    print(i)     i + = 1

 

25 / 40

25. Python can be install on both  Linux and  Windows

26 / 40

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

27 / 40

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

28 / 40

28.

What is the value of the expression 100 / 25?

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

29 / 40

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

30 / 40

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

31 / 40

31.

Which function overloads the >> operator?

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

32 / 40

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

33 / 40

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

34 / 40

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

35 / 40

35.

Python considered the character enclosed in triple quotes as String.(T/F)

a. True

b. False

36 / 40

36. Python has various versions available

37 / 40

37.

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

a. [ ]

b. { }

c. ( )

d. None of the above

38 / 40

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

a) for

b) while

c) Both (a) and (b)

d) None of the above

39 / 40

39.

What will be the output of below Python code?

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

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

40 / 40

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

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.