Courses
Tutorials
Jobs
Practice
Contests
Data Structure
Java
Python
HTML
Interview Preparation
Trending Now
DSA
Web Tech
Foundational Courses
Data Science
Practice Problem
Python
Machine Learning
JavaScript
System Design
Django
DevOps Tutorial
Java
C
C++
ReactJS
NodeJS
CP Live
Aptitude
Puzzles
Projects
Data | structures | Question 8
Q8-How do you access the value associated with a specific key in a Python dictionary? (A)A. Using the get() method(B)B. Using the key index(C)C. Usi...
Read More
Data | structures | Question 1
Q1-What is the correct way to access the last element of a Python list? (A)A. list[-1](B)B. list(1)(C)C. list[last](D)D. list.end() Answer: (A) ...
Read More
Conditionals | and Flow Control | Question 6
Q6-In a Python for loop, which method is used to iterate over the elements of an iterable (e.g., a list or a string) and retrieve both the index and the value?...
Read More
Conditionals | and Flow Control | Question 4
Q4-What is the purpose of the range() function in a Python for loop? (A)A. To generate a list of numbers.(B)B. To specify the number of iterations f...
Read More
Conditionals | and Flow Control | Question 3
Q3-Which of the following statements is true regarding the if-else statement in Python? (A)A. The else block is mandatory.(B)B. The if block is opti...
Read More
Getting | started with python | Question 10
Q10-What is the scope of a variable in Python? (A)A. The scope of a variable is the range of values it can take.(B)B. The scope of a variable is the...
Read More
Getting | started with python | Question 4
Q4-Which operator is used for exponentiation in Python? (A)A. ^(B)B. **(C)C. %(D)D. / Answer: (B) Explanation:In Python, the...
Read More
Getting | started with python | Question 2
Q2-Which of the following is an example of a mutable data type in Python? (A)A. Tuple(B)B. String(C)C. Integer(D)D. List Answer: (D) ...
Read More
Data | structures | Question 10
Q10-Which of the following statements is true regarding Python tuples? (A)A. Tuples are mutable.(B)B. Tuples can be used as keys in dictionaries.(C)...
Read More
Data | structures | Question 9
Q9-What is the key characteristic of a Python set? (A)A. Sets do not allow duplicate elements.(B)B. Sets are ordered collections.(C)C. Elements in a...
Read More
Data | structures | Question 5
Q5-How do you use list comprehension to create a list of squares for even numbers from 1 to 10? (A)A. [x for x in range(1, 11) if x % 2 == 0](B)B. [...
Read More
Data | structures | Question 2
Q2-Which of the following methods is used to add an element to the end of a Python list? (A)A. list.append()(B)B. list.insert()(C)C. list.add()(D)D....
Read More
Conditionals | and Flow Control | Question 8
Q8-What is the purpose of the break statement in a while loop? (A)A. To restart the loop.(B)B. To skip the rest of the code and proceed to the next ...
Read More
Conditionals | and Flow Control | Question 2
Q2-What is the purpose of the elif keyword in a Python if-elif-else statement? (A)A. It is short for "else if" and is used to check multiple conditi...
Read More
Getting | started with python | Question 8
Q8-What does the strip() method do when applied to a Python string? (A)A. Removes leading and trailing whitespaces(B)B. Converts the string to upper...
Read More
1
...
1921
1922
1923
...
11495