[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. Pascal Case
Each word starts with a capital letter:

2 / 40

2.

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

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

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. When does the else statement written after loop executes?

a) When loop condition becomes false

b) When break statement is executed in the loop

c) else statement is always executed

d) None of the above

5 / 40

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

6 / 40

6. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

7 / 40

7.

Which of the following is not a keyword in Python language?

  1. val
  2. raise
  3. try
  4. with

8 / 40

8. Which of the following is the correct extension of the Python file?

9 / 40

9. We can combine strings and numbers by using the format() method

10 / 40

10.

 ____________________ 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

11 / 40

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

12 / 40

12. Variables that are created outside of a function

13 / 40

13.

Which of the following precedence order is correct in Python?

  1. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
  2. Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
  3. Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
  4. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

14 / 40

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

15 / 40

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

16 / 40

16. + operator is used  to get output of multiple variables

17 / 40

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

18 / 40

18. python file can also run on command line

19 / 40

19. Is Python code compiled or interpreted?
a) Python code is both compiled and interpreted
b) Python code is neither compiled nor interpreted
c) Python code is only compiled
d) Python code is only interpreted

20 / 40

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

21 / 40

21.

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.

22 / 40

22.

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

23 / 40

23.

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

24 / 40

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

25 / 40

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

26 / 40

26.

What is the value of the expression 100 / 25?

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

27 / 40

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

28 / 40

28. Is there any comments in  following codes

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

 

29 / 40

29. Which term describes a loop that continues repeating without a terminating (ending) condition?

a) Infinite Loop

b) Conditional Loop

c) Unlimited Loop

d) Sequence Loop

30 / 40

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

31 / 40

31.

In a program, a function can be called ____________ times.

a. 2

b. 3

c. 5

d. Multiple times

32 / 40

32.

Write the output of the following code :

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

a. Weacome

b. Error

c. aWelcome

d. Welcomea

33 / 40

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

34 / 40

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

35 / 40

35.

Which function overloads the >> operator?

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

36 / 40

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

37 / 40

37. Python is a  high-level programming language.

38 / 40

38.

What will be the output of above Python code?

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

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

39 / 40

39. Python has various versions available

40 / 40

40.

Which of the following statements assigns the value 25 to the variable x in Python:

  1. x ← 25
  2. x = 25
  3. x := 25
  4. int x = 25
  5. x << 25

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.