Programming in Python
OBJECTIVE ASSESSMENT ACTUAL EXAM
2025/2026 QUESTIONS WITH VERIFIED
CORRECT SOLUTIONS || 100%
GUARANTEED PASS
<BRAND NEW VERSION>
1. Create a solution that accepts an integer input representing a 9-
digit unformatted student identification number. Output the
identification number as a string with no spaces.
The solution output should be in the format
111-22-3333 - ANSWER ✓ student_id = int(input())
student_id >= 100000000 and student_id <= 999999999
part1 = student_id // 1000000
part2 = (student_id // 10000) % 100
part3 = student_id % 10000
formatted_id = f"{part1}-{part2}-{part3}"
print(formatted_id)
2. Create a solution that accepts an integer input to compare against
the following list:
predef_list = [4, -27, 15, 33, -10]
Output a Boolean value indicating whether the input value is
greater than the maximum value from predef_list
, The solution output should be in the format
Greater Than Max? Boolean_value - ANSWER ✓ num =
int(input())
boolean_value = False
max_value = max(predef_list)
if num > max_value:
boolean_value = True
print(f"Greater Than Max? {boolean_value}")
else:
print(f"Greater Than Max? {boolean_value}")
3. Create a solution that accepts one integer input representing the
index value for any of the string elements in the following list:
frameworks = ["Django", "Flask", "CherryPy", "Bottle",
"Web2Py", "TurboGears"]
Output the string element of the index value entered. The solution
should be placed in a try block and implement an exception of
"Error" if an incompatible integer input is provided.
The solution output should be in the format
frameworks_element - ANSWER ✓ try:
index = int(input())
frameworks_element = (frameworks[index])
print(frameworks_element)
except (ValueError, IndexError):
print("Error")
4. Create a solution that accepts an integer input representing water
temperature in degrees Fahrenheit. Output a description of the
water state based on the following scale:
If the temperature is below 33° F, the water is "Frozen".
If the water is between 33° F and 80° F (including 33), the water is
"Cold".
, If the water is between 80° F and 115° F (including 80), the water
is "Warm".
If the water is between 115° F and 211° (including 115) F, the
water is "Hot".
If the water is greater than or equal to 212° F, the water is
"Boiling".
Additionally, output a safety comment only during the following
circumstances:
If the water is exactly 212° F, the safety comment is "Caution:
Hot!"
If the water temperature is less than 33° F, the safety comment is
"Watch out for ice!"
The solution output should be in the format
water_state optional_safety_comment - ANSWER ✓ temperature
= int(input())
water_state = ""
optional_safety_comment = ""
if temperature < 33:
water_state = "Frozen"
optional_safety_comment = "Watch out for ice!"
elif 33 <= temperature < 80:
water_state = "Cold"
elif 80 <= temperature < 115:
water_state = "Warm"
elif 115 <= temperature < 212:
water_state = "Hot"
elif temperature >= 212:
water_state = "Boiling"
if temperature == 212:
optional_safety_comment = "Caution: Hot!"
print(water_state)
if optional_safety_comment:
print(optional_safety_comment)