@@ -0,0 +1,1014 @@
+# Problem Solving (Basic) Skill Verification Test%0A%0A#!/bin/python3%0A%0Aimport math%0Aimport os%0Aimport random%0Aimport re%0Aimport sys%0A%0A#%0A# Complete the 'getBattery' function below.%0A#%0A# The function is expected to return an INTEGER.%0A# The function accepts INTEGER_ARRAY events as parameter.%0A#%0A%0Adef getBattery(events):%0A    battery_level = 50%0A    while events != %5B%5D:%0A        battery_level = perform_event(events.pop(0), battery_level)%0A    return battery_level%0A%0Adef perform_event(event, battery_level):%0A    potential_battery = battery_level + event%0A    if potential_battery %3E= 100:%0A        return 100%0A    elif potential_battery %3C= 0:%0A        return 0%0A    else:%0A        return potential_battery%0A%0Aif __name__ == '__main__':%0A    fptr = open(os.environ%5B'OUTPUT_PATH'%5D, 'w')%0A%0A    events_count = int(input().strip())%0A%0A    events = %5B%5D%0A%0A    for _ in range(events_count):%0A        events_item = int(input().strip())%0A        events.append(events_item)%0A%0A    result = getBattery(events)%0A%0A    fptr.write(str(result) + '%5Cn')%0A%0A    fptr.close()%0A

Solve gaming laptop battery life