#! /bin/bash
	
# This line parses the template and put the result in studentcode.py
parsetemplate --output student/studentcode.py template.py 

# Verify the output of the code...
output=$(run_student python student/studentcode.py)
return_val=$?

if [ "$return_val" = "252" ]; then
    feedback --result overflow --feedback "Your code used too much memory :-("
elif [ "$return_val" = "253" ]; then
    feedback --result timeout --feedback "Your code made a time out :-("
elif [ "$output" = "Hello World!" ]; then
	# The student succeeded
	feedback --result success --feedback "You solved this *difficult* task!"
else
	# The student failed
	feedback --result failed --feedback "Your output is $output"
fi