Academic Year 2023
Python entry test – session 3
General note: The following code is executed as the first cell of the notebook in which all other problems’ codes are run.
import numpy as np
from scipy.integrate import solve ivp
import scipy.stats as st
import matplotlib.pyplot as plt1. What is the output of this code
a = np.ones((1, 3))
b = np.ones((3, 1))
c = a @ b
print(int(c))| A | B | C | D | E | F | G | H |
|----|----|----|---|---|---|---|-------|
| -9 | -3 | -1 | 0 | 1 | 0 | 9 | Error |2. What is the output of this code?
a = np.array(range(100)).reshape((10, -1))
b = np.array(range(100)).reshape((10, -1))
c = a @ b
print(c[0, 0])| A | B | C | D | E | F | G | H | K | L |
|---|----|-----|-----|-----|------|------|------|-------|-------|
| 1 | 10 | 100 | 285 | 385 | 2850 | 3355 | 7495 | 28500 | 29410 |3. What is the output of this code?
4. What is the output of this code?
5. What is the output of this code?
6. What is the output of this code?
7. Which of the following variables are True?
8. What complexity does the Insertion Sort algorithm have in the worst case?
Answer must contain: (time complexity / space complexity).
A.
B.
C.
D.
E.
F.
G.
H.
K.
L.
9. What complexity does the insertion in doubly-linked list have in the worst case?
Answer must contain: (time complexity / space complexity).
A.
B.
C.
D.
E.
F.
G.
H.
K.
L.
10. What is the output of this code?
A.

B.

C.

D.

E.

F.

G.

H.

Last updated