[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

3.

Write the output of the following code :

str = "Welcome"str[2] = 'a'print(str)

a. Weacome

b. Error

c. aWelcome

d. Welcomea

4 / 40

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

5 / 40

5. Pip is  not a powerful package management system for Python software packages

6 / 40

6.

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

7 / 40

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

8 / 40

8.

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.

9 / 40

9. Python has various versions available

10 / 40

10. Python is an interpreted programming language

11 / 40

11. Extension of all Python  Programme are .py

12 / 40

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

13 / 40

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

14 / 40

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

15 / 40

15. python file can also run on command line

16 / 40

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

17 / 40

17.

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

18 / 40

18. The format() method takes the passed arguments

19 / 40

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

a) for

b) while

c) Both (a) and (b)

d) None of the above

20 / 40

20.

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

a. Define

b. DEF

c. def

d. Def

21 / 40

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

22 / 40

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

23 / 40

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

24 / 40

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

25 / 40

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

26 / 40

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

27 / 40

27. Indentation refers to the spaces at the beginning of a code line.

28 / 40

28.

Which of the following is False?

A. String is immutable.
B. capitalize() function in string is used to return a string by converting the whole given string into uppercase.
C. lower() function in string is used to return a string by converting the whole given string into lowercase.
D. None of these.

29 / 40

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

30 / 40

30. Python can connect to database systems.

31 / 40

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

32 / 40

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

33 / 40

33. Python relies on indentation?

34 / 40

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

a. 5

b. 3

c. 6

d. 7

35 / 40

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

36 / 40

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

37 / 40

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

38 / 40

38.

Which function overloads the >> operator?

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

39 / 40

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

40 / 40

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

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.