Post

Python Programming
Python Programming@PythonPr·
Python Question / Quiz; What is the output of the following Python code, and why? Comment your answers below!
Python Programming tweet media
English
15
7
85
6.3K
Earnest Codes
Earnest Codes@Earnesto037·
@PythonPr Answer: A. 1 The code iterates through a nested list to find the minimum value.  Initially, x is set to the first element of the nested list, which is values[0][0] or (3). The outer loop iterates through each inner list ([3, 4, 5, 1] and [33, 6, 1, 2]). The inner
English
1
0
7
341
Ayo.config ⚙️
Ayo.config ⚙️@Ayo0xx2·
@PythonPr A). the code scans every number in the nested lists and keeps updating x whenever it finds something smaller and the smallest value in all the lists is 1.
English
0
0
3
184
Othieno Michael Edwards
Othieno Michael Edwards@EdwardsOthieno·
@PythonPr CheatCode 1. list of lists (a 2D array or matrix). 2. values[0] accesses the first inner list, which is [3, 4, 5, 1]. 3. [0]then accesses the first element within that inner list. 4. values[0][0] evaluates to 3. 5. 2nd (for loop) combs through values 6. 3 > 1 & 2 7. 1 smaller
English
0
0
1
144
แชร์