[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

2 / 40

2.

 ____________________ 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

3 / 40

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

4 / 40

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

5 / 40

5. What keyword would you use to add an alternative condition to an if statement?

a) else if
b) elseif
c) elif
d) None of the above

6 / 40

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

7 / 40

7. Comments starts with a #

8 / 40

8. Is there any comments in  following codes

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

 

9 / 40

9. Which of the following is used to define a block of code in Python language?
a) Indentation
b) Key
c) Brackets
d) All of the mentioned

10 / 40

10. python file can also run on command line

11 / 40

11. Comments can be used to explain Python code.

12 / 40

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

13 / 40

13. Can we write if/else into one line in python?

a) Yes
b) No
c) if/else not used in python
d) None of the above

14 / 40

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

15 / 40

15.

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

a. [ ]

b. { }

c. ( )

d. None of the above

16 / 40

16. Identity operators are used to compare the objects, not if they are equal, but if they are actually the same object, with the same memory location

17 / 40

17. Extension of all Python  Programme are .py

18 / 40

18. Most recent major version of Python is Python 3

19 / 40

19. print() function is often used to output variables.

20 / 40

20.

Which function overloads the >> operator?

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

21 / 40

21.

 Select the correct example of complex datatype in Python

  1. 3 + 2j
  2. -100j
  3. 5j
  4. All of the above are correct

22 / 40

22. With the break statement we can stop the loop even if the while condition is true

23 / 40

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

24 / 40

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

25 / 40

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

26 / 40

26. Operators are used to perform operations on variables and values

27 / 40

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

28 / 40

28.

Which is the correct operator for power(xy)?

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

29 / 40

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

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

32 / 40

32. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

33 / 40

33. The for loop does not require an indexing variable to set beforehand

34 / 40

34.

What will be the output of below Python code?

str1="Information"print(str1[2:8])

A. format
B. formatio
C. orma
D. ormat

35 / 40

35.

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

a. Define

b. DEF

c. def

d. Def

36 / 40

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

37 / 40

37. Which of the following is False regarding loops in Python?

a)Loops are used to perform certain tasks repeatedly.

b) while loop is used when multiple statements are to executed repeatedly until the given condition becomes true.

c) while loop is used when multiple statements are to executed repeatedly until the given condition becomes false.

d) for loop can be used to iterate through the elements of lists.

38 / 40

38. Who developed Python Programming Language?

39 / 40

39. Python can connect to database systems.

40 / 40

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

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.