[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

2 / 40

2.

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.

3 / 40

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

4 / 40

4.

How to copy one list to another in python?

A. l1[] = l2[]
B. l1[] = l2
C. l1[] = l2[:]
D. l1 = l2

5 / 40

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

6 / 40

6. Python can be install on both  Linux and  Windows

7 / 40

7.

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

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

8 / 40

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

9 / 40

9.

Which function overloads the >> operator?

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

10 / 40

10. Python is a  high-level programming language.

11 / 40

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

12 / 40

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

13 / 40

13. Python relies on indentation?

14 / 40

14. Python has various versions available

15 / 40

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

16 / 40

16.

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

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 allows you to extract the values into variables.

19 / 40

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

20 / 40

20. An example of an illegal character is a double quote inside a string that is surrounded by double quotes

21 / 40

21.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

22 / 40

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

23 / 40

23. python file can also run on command line

24 / 40

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

25 / 40

25. Python can connect to database systems.

26 / 40

26. Who developed Python Programming Language?

27 / 40

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

28 / 40

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

29 / 40

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

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. What will be the output of the following Python code?

  1. d = {"john":40, "peter":45}
  2. d["john"]

a) 40
b) 45
c) “john”
d) “peter”

32 / 40

32. Extension of all Python  Programme are .py

33 / 40

33.

Write the output of the following code :

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

a. Weacome

b. Error

c. aWelcome

d. Welcomea

34 / 40

34. Find and write the output of the following python code:

x = “abcdef”

i = “a”

while i in x:

print(i, end = ” “)

a) a

b) a a a a a a

c) a a a a a a … infinite times

d) Code will generate error

35 / 40

35.

 Which of the following statement is False?

  1. Variable names can be arbitrarily long.
  2. They can contain both letters and numbers.
  3. Variable name can begin with underscore.
  4. Variable name can begin with number.

36 / 40

36. You can also have an else without the elif

37 / 40

37.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

38 / 40

38.

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

39 / 40

39. What does the following code print?

x = -10if x < 0:    print("The negative number ",  x, " is not valid here.")print("This is always printed")
a.This is always printedb.The negative number -10 is not valid hereThis is always printedc.The negative number -10 is not valid here

40 / 40

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

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.