CSCE 110 EXAM 2025/2026 QUESTIONS
AND ANSWERS 100% PASS
What is the output of the following code?
print('abc', end with = 'period')
print('def', end = '*')
print('xyz') - ANS 'abcperioddef*xyz'
What is the output of the following code?
x = 5 + 2**3 // 3 - ANS 7
Which ones are valid variable names?
1. ____
2. 2abc00
3. false
4. all_$200
5. Num_of_students
6. - ANS 1, 3, 4, 5, 6
What is the output of this code?
a_list = ['a', 10, 1.23, 'Tom']
1 @COPYRIGHT 2025/2026.
, b_tuple = (1, 2, 3, 4, 5, 6)
print(a_list.index('Tom') + b_tuple.index(5) - ANS 7
When opening a file with the mode 'w' and if the file does NOT exist, what happens? -
ANS The file is created
The name used to refer to the current instance in a class - ANS self
what is an input converted to? - ANS a string
what is the output of this code>
class Student:
.def __init__(self, name, id):
.self.name = name
.self.id = id
.def print_info(self, address):
.self.address = address
.print(self.name)
.print(self.id)
.print(self.address)
s1 = Student('Tom Smith', 'G001')
s1.print('123 Main St') - ANS Tom Smith
G001
123 Main St
what is the output for this code?
a_list = [-10, 10, -20, 20, -30, 30]
2 @COPYRIGHT 2025/2026.
AND ANSWERS 100% PASS
What is the output of the following code?
print('abc', end with = 'period')
print('def', end = '*')
print('xyz') - ANS 'abcperioddef*xyz'
What is the output of the following code?
x = 5 + 2**3 // 3 - ANS 7
Which ones are valid variable names?
1. ____
2. 2abc00
3. false
4. all_$200
5. Num_of_students
6. - ANS 1, 3, 4, 5, 6
What is the output of this code?
a_list = ['a', 10, 1.23, 'Tom']
1 @COPYRIGHT 2025/2026.
, b_tuple = (1, 2, 3, 4, 5, 6)
print(a_list.index('Tom') + b_tuple.index(5) - ANS 7
When opening a file with the mode 'w' and if the file does NOT exist, what happens? -
ANS The file is created
The name used to refer to the current instance in a class - ANS self
what is an input converted to? - ANS a string
what is the output of this code>
class Student:
.def __init__(self, name, id):
.self.name = name
.self.id = id
.def print_info(self, address):
.self.address = address
.print(self.name)
.print(self.id)
.print(self.address)
s1 = Student('Tom Smith', 'G001')
s1.print('123 Main St') - ANS Tom Smith
G001
123 Main St
what is the output for this code?
a_list = [-10, 10, -20, 20, -30, 30]
2 @COPYRIGHT 2025/2026.