<jupyter_start><jupyter_text><NAME> - Part 3: Parallel ParkingIn this section you will write a function that implements the correct sequence of steps required to parallel park a vehicle.**Note** for this segment the vehicle's maximum speed has been set to just over 4 mph. This should make parking a little easier.![](https://upload.wikimedia.org/wikipedia/commons/2/26/ParallelParkingAnimation.gif)<jupyter_code>%%HTML
<button id="launcher">Launch Car Simulator</button>
<script src="setupLauncher.js"></script>
# CODE CELL
#
# Write the park function so that it actually parks your vehicle.
# Use Car.gas() to set the acceleration.
# Rememeber v = at and x = vt + 1/2at^2
# You will not need these equations but just
# to inform your intuition

from Car import Car
import time

def park(car):
    # TODO: Fix this function!
    #  currently it just drives back and forth
    #  Note that the allowed steering angles are
    #  between -25.0 and 25.0 degrees and the 
    #  allowed values for gas are between -1.0 and 1.0
    
    # back up for 3 seconds
    car.steer(0.0)
    car.gas(-0.4)   
    
    # turn right for 25 degrees
    car.steer(25)
    time.sleep(3)    
    
    #turn left for 25 degrees
    car.steer(-25)
    time.sleep(3)

    # stop
    car.steer(0)
    car.gas(0.2)
    time.sleep(0.8)
    car.gas(0)
    time.sleep(0)
               
car = Car()
park(car)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09773371104815864, 'fraction_numerical': 0.028328611898016998, 'mean_word_length': 3.002832861189802, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '180624', 'license': 'MIT', 'n_tokens_mistral': 476, 'n_tokens_neox': 446, 'n_words': 163, 'path': 'Project-JoyRide/parallel_parking.ipynb', 'repo_name': 'alchemz/Intro-to-Self-Driving-Car', 'size': '1414'}