I got delayed too. I've only been working on level 1 for about 3 weeks.
if Input.is_action_just_pressed("ui_up") and is_on_floor():
velocity.y = 1 * 1
if Input.is_action_just_pressed("ui_down") and is_on_floor():
velocity.y = -1 * 1
if is_on_floor():
velocity.y = get_axis('ui_up', 'ui_down') * 1