[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

What will be the output of below Python code?

tupl=([2,3],"abc",0,9)tupl[0][1]=1print(tupl)A. ([2,3],"abc",0,9)B. ([1,3],"abc",0,9)C. ([2,1],"abc",0,9)D. Error

2 / 40

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

3 / 40

3. Comments can be used to explain Python code.

4 / 40

4. Python is an interpreted programming language

5 / 40

5.

Write the output of the following code :

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

a. Weacome

b. Error

c. aWelcome

d. Welcomea

6 / 40

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

7 / 40

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

8 / 40

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

9 / 40

9.

 What is output of: 35 == 35.0

  1. False
  2. True
  3. 33
  4. None of the above

10 / 40

10. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

11 / 40

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

12 / 40

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

13 / 40

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

14 / 40

14. A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

15 / 40

15.

l = [ 4, 8, 9, 2.6, 5 ] is a type of which data type in python?

  1. List
  2. Tuple
  3. Set
  4. None of these

16 / 40

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

17 / 40

17. Is there any comments in  following codes

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

 

18 / 40

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

19 / 40

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

20 / 40

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

21 / 40

21.

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.

22 / 40

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

23 / 40

23.

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

24 / 40

24.

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

a. Define

b. DEF

c. def

d. Def

25 / 40

25. You can also have an else without the elif

26 / 40

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

27 / 40

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

28 / 40

28.

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

a. [ ]

b. { }

c. ( )

d. None of the above

29 / 40

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

30 / 40

30. Python can connect to database systems.

31 / 40

31.

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

32 / 40

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

33 / 40

33. All keywords in Python are in _________
a) Capitalized
b) lower case
c) UPPER CASE
d) None of the mentioned

34 / 40

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

35 / 40

35. python has two primitive loop commands:

  • while loops
  • for loops

36 / 40

36.

What will be the output of below Python code?

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

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

37 / 40

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

38 / 40

38. Comments starts with a #

39 / 40

39.

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

40 / 40

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

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.