The 'Software Engineering Midterm 2' assesses knowledge in Python programming, focusing on string manipulations, set operations, and list comprehensions. It tests practical coding skills and theoretical understanding, essential for software engineering students.
Rate this question:
If the first element is true
If all elements are true
If the list is empty
If the list is not empty
Rate this question:
[[0,0], [0,0]]
Doesn't compile or throws an error
[[1,0], [1,0]]
[[1,1], [1,1]]
[[1,0], [0,0]]
Rate this question:
Rate this question:
Checks to see if a and p point to the same memory address.
Doesn't compile.
Checks if input is a palindrome (reversed string is the same string).
Stores the first character in a. Stores the first character from that and stores it in p. Checks to see if their contents are equal.
Prints true
Prints false
Stores the first character in input into a. Stores last character in a into p. Compares
Rate this question:
Range(0,5)
Range(5)
List([0,1,2,3,4])
Set([0,1,2,3,4])
Dict({1:a})
"abcde"
Set([0,1,2,3,4])
01234
Rate this question:
C = set() c = f.copy
C = set() c |= f
C = set(f)
Rate this question:
Only lists, not tuples or frozen sets
Only tuples, not lists or frozen sets
Only lists and tuples, not frozen sets
Any iterable container
An iterable container with hashable objects
Mutable objects
Hashable objects
Anything
Rate this question:
Rate this question:
Inserting at b and m are O(n)
Deleting from b or m are O(n)
Adding to e is O(n)
Adding to e is ~O(1)
Adding to e is O(1)
Indexing is O(n)
Indexing is O(1)
Inserting at b or m are amortized constant
Inserting at b or m are ~O(1)
Rate this question:
Set([1,2,3])
Tuple(1,2,3)
List([1,2,3])
Frozenset([1,2,3])
"abc123"
12345
A() (where A is a valid class)
Rate this question:
{'k': 'v'}
Error: can't initialize list with None variables
[123, 'abc', 2.75, 'k']
Error: list must be homogeneous (all objects same time)
Error: can't slice list (L[3:])
Error: assignment of slice must be of same length
Error: assignment of slice must be utterable
[123, 'abc', 2.75, 'v']
[123, 'abc', 2.75, {'k':'v'}]
123
Rate this question:
Inserting is O(1)
Inserting is ~O(1)
Inserting is O(n)
Deleting is O(1)
Deleting is ~O(1)
Deleting is O(n)
Indexing is O(1)
Indexing is ~O(1)
Indexing is O(log n)
Indexing is O(n)
Rate this question:
A.append()
A.append(1)
A[0]=3
A.append([1,2,3])
A.extend(1)
A.extend([1,2,3])
A.append([])
S1|s2 == (s1^s2) | (s1&s2)
S1^s2 == (s2|s1)-(s1&s2)
S1-s1 == s1^s1
S1-s1 == s2^s2
S1&s2
S1
S1&s2
S1|s2
S1&s2 = (s1|s2) - (s1^s2)
Rate this question:
Adding to b and e are O(1)
Adding to b and e are ~O(1)
Adding to b and e are O(n)
Deleting from b and e are O(1)
Deleting from b and e are ~O(1)
Deleting from b and e are O(n)
Indexing is O(1)
Indexing is O(n)
Rate this question:
Rate this question:
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
How Well Do You Know Python?
Are you an expert in Python, or simply curious about the programming language? Whatever the case, take our online quiz and answer quiz questions to see how strong is your...
Questions:
11 |
Attempts:
531 |
Last updated:
Nov 16, 2023
|
The Ultimate Python Programming MCQ Test
Python, you must know about this if you are related to Programming in any way. Here is the ultimate Python programming MCQ test for you that we have brought. Python is a...
Questions:
63 |
Attempts:
2517 |
Last updated:
Jul 16, 2023
|
Quiz In Python(Grade-11)-Delta English School
This quiz for Grade 11 at Delta English School focuses on Python programming, covering topics like data types, CPU architecture, operating systems, and numeric systems.
Questions:
10 |
Attempts:
279 |
Last updated:
Sep 23, 2024
|
Python File Quiz: Trivia Test!
Get ready to take this Python Quiz. Python is known as one of the high-level programming languages that are used by programmers all around the world. Here, you will test your...
Questions:
10 |
Attempts:
3816 |
Last updated:
Mar 22, 2023
|
Python Programming Quiz: Trivia Test!
Python programming quiz: trivia test! There are a lot of people who think python is hard to understand, but it is actually the easiest to understand for beginners. Do you think...
Questions:
15 |
Attempts:
262 |
Last updated:
Mar 20, 2023
|
Python Online Test
Want to test your Python skills? Take our Python Online Test and see how well you know your way around one of the most popular programming languages. This test is designed to...
Questions:
10 |
Attempts:
3013 |
Last updated:
Aug 21, 2024
|
Wait!
Here's an interesting quiz for you.