[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2.

Which function overloads the >> operator?

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

3 / 40

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

4 / 40

4. python file can also run on command line

5 / 40

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

6 / 40

6. Comments can’t be used to prevent execution when testing code.

7 / 40

7. Python has various versions available

8 / 40

8.

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

9 / 40

9. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

10 / 40

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

11 / 40

11.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

12 / 40

12. Comments starts with a #

13 / 40

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

14 / 40

14.

In the Python statement x = a + 5 – b:

a and b are ________a + 5 - b is ________
  1. terms, a group
  2. operators, a statement
  3. operands, an expression
  4. operands, an equation

15 / 40

15.

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

16 / 40

16. Who developed Python Programming Language?

17 / 40

17. The format() method takes the passed arguments

18 / 40

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

19 / 40

19.

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

a. Define

b. DEF

c. def

d. Def

20 / 40

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

21 / 40

21.

What will be the output of below Python code?

str1="poWer"str1.upper()print(str1)

A. POWER
B. Power
C. power
D. poWer

22 / 40

22. The length of an array is always one more than the highest array index.

23 / 40

23. Python relies on indentation?

24 / 40

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

25 / 40

25. Variables that are created outside of a function

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

29.

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

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

30 / 40

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

31 / 40

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

32 / 40

32. What will be the output of the following Python code?

x = ['ab', 'cd']for i in x:    i.upper()print(x)

a) [‘ab’, ‘cd’]
b) [‘AB’, ‘CD’]
c) [None, None]
d) none of the mentioned

33 / 40

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

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. The for loop in Python is an _____________

a) Entry Controlled Loop

b) Exit Controlled Loop

c) Both of the above

d) None of the above

36 / 40

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

37 / 40

37. A variable name cannot start with a number

38 / 40

38. Is there any comments in  following codes

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

 

39 / 40

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

40 / 40

40.

What is the data type of print(type(0xFF))

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.