[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

 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.

2 / 40

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

3 / 40

3. You can also have an else without the elif

4 / 40

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

5 / 40

5.

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

a. [ ]

b. { }

c. ( )

d. None of the above

6 / 40

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

7 / 40

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

8 / 40

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

9 / 40

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

10 / 40

10.

Which statement is correct?

A. List is immutable && Tuple is mutable
B. List is mutable && Tuple is immutable
C. Both are Mutable.
D. Both are Immutable

11 / 40

11. A variable name must start with a letter or the underscore character

12 / 40

12. Find the output of the given Python program?

a, b, c = 1, 3, 5if a > 0:  if b < 2:    print("Hi")  elif c > 3:    print("Hello")else:  print("Know Program")

a) Hi
b) Hello
c) Know Program
d) Compiled Successfully, No Output.

13 / 40

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

14 / 40

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

15 / 40

15. The format() method takes the passed arguments

16 / 40

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

17 / 40

17.

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

a. Define

b. DEF

c. def

d. Def

18 / 40

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

19 / 40

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

20 / 40

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

21 / 40

21. To insert characters that are illegal in a string, use an escape character

22 / 40

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

23 / 40

23.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

24 / 40

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

25 / 40

25.

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.

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

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

30 / 40

30. During Installation Make sure to select both the checkboxes at the bottom .

31 / 40

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

32 / 40

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

33 / 40

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

34 / 40

34. You can also have multiple else statements on the same line:

35 / 40

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

36 / 40

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

37 / 40

37. if statements cannot be empty, but if you for some reason have an if statement with no content, put in the pass statement to avoid getting an error

38 / 40

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

39 / 40

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

40 / 40

40.

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

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

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.