[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2.

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

a. [ ]

b. { }

c. ( )

d. None of the above

3 / 40

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

4 / 40

4.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

5 / 40

5. Is there any comments in  following codes

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

 

6 / 40

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

7 / 40

7. You can use three double quotes only:

a = “””Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.”””
print(a)

8 / 40

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

9 / 40

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

10 / 40

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

11 / 40

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

12 / 40

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

13 / 40

13.

Choose the correct option with respect to Python.

A. Both tuples and lists are immutable.
B. Tuples are immutable while lists are mutable.
C. Both tuples and lists are mutable.
D. Tuples are mutable while lists are immutable.

14 / 40

14.

 ____________________ can be defined as a named group of instructions that accomplish a specific task when it is invoked/called.

a. Function

b. Datatype

c. Token

d. Operator

15 / 40

15. The len() method to return the length of an array

16 / 40

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

17 / 40

17.

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.

18 / 40

18. Python has various versions available

19 / 40

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

20 / 40

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

21 / 40

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

22 / 40

22.

What will be the output of above Python code?

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

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

23 / 40

23. Extension of all Python  Programme are .py

24 / 40

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

25 / 40

25. Who developed Python Programming Language?

26 / 40

26. Snake Case
Each word is separated by an underscore character:

27 / 40

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

28 / 40

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

29 / 40

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

30 / 40

30.

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

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

31 / 40

31. Which of the following character is used to give single-line comments in Python?
a) //
b) #
c) !
d) /*

32 / 40

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

33 / 40

33. python has two primitive loop commands:

  • while loops
  • for loops

34 / 40

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

35 / 40

35. Python relies on indentation?

36 / 40

36.

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

37 / 40

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

38 / 40

38. Python is a  high-level programming language.

39 / 40

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

40 / 40

40. The format() method takes the passed arguments

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.