This is the activity: a) Create a new Python script named Inside this script, add the necessary code that does the following:

First, you will call the get_laser_full() function, and will store its response into a Python list.

Then, you will print the positions 0, 360 and 719 of the full list of readings.

I don't know how to take the output of the laser and input that into a list. Any help or direction would be appreciated.

asked 03 Jul, 19:55

stevencloud9's gravatar image

accept rate: 0%

If you collect the 3 values in separate variables (for this example called x, y, z), then you can simply use:

return [x, y, z]

since python uses square brackets ( '[' and ']') to indicate a list.

For some reason I've been getting error messages with get_laser() since yesterday, so if your program isn't working that may be the issue.

permanent link

answered 04 Jul, 00:24's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 03 Jul, 19:55

question was seen: 49 times

last updated: 04 Jul, 00:24

powered by OSQA