Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
360
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1.  Comment and test out the following code until you COMPLETELY understand it. Do one slide at a time and try to figure it out BY YOURSELF!
  • 2. One long way:
  • 3. A shorterway:
  • 4. An evenshorter way:
  • 5. What does this line do? ‘python’[::-1] Knowing this, rewrite is_palindrome so that this function is only one line without using any of the previous definitions mentioned! This would make it the shortest way of writing this function.
  • 6. Adding SwampyStep ONE: Download the swampy zipfilefrom our course websiteStep TWO:Unzip it to somewhere easy toaccess in your home (h:) driveStep THREE :Go to your desktop > right clickon ‘my computer’ > properties> advanced tab > environmentvariables > click ‘new’ underuser variables
  • 7. Adding SwampyStep FOUR:Under variable name type:PYTHON PATHUnder variable value type:H: [AND THEN THE PATH YOUSAVED IT TO]Step FIVE:Restart python.Step SIX:To check if you did itcorrectly, in the Python Shelltype in:From TurtleWorld import *If that didn’t’give you anerror, you are good to go!