<jupyter_start><jupyter_text>Example 2 -  The Problems with Sequential Execution<jupyter_code>import time
#Import
from udacidrone import Drone
from udacidrone.connection import MavlinkConnection

#Open connection with the simulator
conn = MavlinkConnection('tcp:127.0.0.1:5760', threaded=True)
drone = Drone(conn)
drone.start()
#Take the control
drone.take_control()
#Turn on the motors
drone.arm()
#Takeoff 5m
drone.takeoff(5)
#cmd_position(north, east, down, heading)
drone.cmd_position(10,0,5,0)
drone.cmd_position(0,0,5,0)
squere = [
    (10, 0, 5, 0),
    (10, 10, 5, 0),
    (0, 10, 5, 0),
    (0, 0, 5, 0),
]
for corner in squere:
    drone.cmd_position(*corner)
    print(*corner)
    time.sleep(3)
    
drone.stop()<jupyter_output>Closing connection ...
{'fraction_non_alphanumeric': 0.13648293963254593, 'fraction_numerical': 0.05643044619422572, 'mean_word_length': 4.824427480916031, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '258443', 'license': 'MIT', 'n_tokens_mistral': 333, 'n_tokens_neox': 297, 'n_words': 72, 'path': 'udacity/flycar/FCND-Term1-Starter-Kit/examples/Example2-SequentialProblem.ipynb', 'repo_name': 'lourencoccc/courses', 'size': '762'}