Looking for CS 1101-01 Programming Fundamentals - AY2026-T1 test answers and solutions? Browse our comprehensive collection of verified answers for CS 1101-01 Programming Fundamentals - AY2026-T1 at my.uopeople.edu.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Handling an exception with a try statement is called throwing an exception.
n = 10
while n != 1:
print (n,end=' ')
if n % 2 == 0: # n is even
n = n // 2
else: # n is odd
n = n * 3 + 1
What is the output of the following Python statements?
def recurse(a): if (a == 0): print(a) else: recurse(a)
recurse(1)
What is Python’s response to the command: type(0.123)
Consider the following Python program.
fin = open('words.txt')for line in fin: word = line.strip() print(word)
What is word?
mylist = [ [2,4,1], [1,2,3], [2,3,5] ]
a=0
b=0
total = 0
while a <= 2:
while b < 2:
total += mylist[a][b]
b += 1
a += 1
b = 0
print (total)
What is the output of the following Python program?
try: fin = open('answer.txt') fin.write('Yes')except: print('No')print('Maybe')
Learning to debug can be frustrating, but it is a valuable skill that is useful for many activities beyond programming.
n = 10000
count = 0
while n:
count = count + 1
n = n // 10
print (count)