I have written this code to attempt to get a particular video to play, depending on the reaction time (time taken to press the space bar). The experiment crashes before it even begins, (Alert 4205:Python Syntax Error in ‘End Routine’ tab. See 'if rounded_space_bar = 0.5:
’ on line number 4 of the ‘End Routine’ tab.) I am new to this, so apologies if this seems like a trivial question!
rounding the space bar reaction times (RT) to the nearest 0.5 seconds.
Thank-you for the help! It is still saying I have a Syntax error. Where am I going wrong?
# rounding the space bar reaction times (RT) to the nearest 0.5 seconds.
rounded_space_bar = round(space_bar.rt)
# selecting particular videos, depending on the RT.
if rounded_space_bar == 0.5:
video_selected = Adobe_videos/0.5_video.mp4
elif rounded_space_bar == 1.0:
video_selected = Adobe_videos/1.0_video.mp4
else:
video_selected = Adobe_videos/1.5_video.mp4
# rounding the space bar reaction times (RT) to the nearest 0.5 seconds.
rounded_space_bar = round(space_bar.rt)
# selecting particular videos, depending on the RT.
if rounded_space_bar == 0.5:
video_selected = "Adobe_videos/0.5_video.mp4"
elif rounded_space_bar == 1.0:
video_selected = "Adobe_videos/1.0_video.mp4"
else:
video_selected = "Adobe_videos/1.5_video.mp4"