CS-1101 Final Exam Part-1 Term 5>CS 1101 Programming Fundamentals - Term 5
The Python code below is an example of recursion: def fa(): fb() def fb(): fa() fa() Select one: True False What output will the following code produce? n = 10 while n != 1: print (n,) if n % 2 == 0: # n is even n = n // 2 else: # n is odd n = n * 3 + 1 Select one: a. 10 5 16 8 4 2 b. None an error will be displayed c. 8 4 2 d. 16 8 4 2 CS 1101 Programming Fundamentals - Term 5, This study source was downloaded by from CourseH on :06:31 GMT -06:00 Question 3 Not yet answered Marked out of 1.00 Question 4 Not yet answered Marked out of 1.00 Given a Python dictionary d and a value v, it is efficient to find the corresponding key: d[k] = v. Select one: True False What is the output of the following Python statements? x = 5 if x % 2 == 1: print (x) else: print (x, x%2) Select one: a. 5 b. (5, 1) c. 2 d. (
Written for
- Institution
-
California College Of The Arts
- Module
-
ARTS 321
Document information
- Uploaded on
- February 22, 2023
- Number of pages
- 5
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Unknown
Subjects
- arts 321
-
cs 1101 final exam part 1 term 5
Also available in package deal