Join Michele Vallisneri for an in-depth discussion in this video ✓ Solution: functional fractal, part of Python: Programming Efficiently.
- [Instructor] Let me start my solution…by importing all packages and modules.…I've also collected some code from the challenge set-up…and from the video on functional programming in Python,…namely, the definition of the turtle method fb…and the definition of partial functions,…capital F and capital L for turtle forward and left.…Last, the high order function iterated…and we need to add a new partial…for turtle forward and back.…This is very similar to the partial for forward.…
Then, I'll define a function that takes list of steps…and replaces fb steps only…with a branching sequence.…I grabbed the distance from the fb partial.…Here I'm replacing an fb step with a branching sequence.…We have some turns and some shorter fb steps,…everything else we leave alone.…We can iterate funcbranch starting from a single segment…to obtain a fractal tree.…
Here's a single forward and back segment…and then I need to build a terrarium around my solution.…All done.…We can play it again with an animation.…
- Designing efficient loops
- Exploiting Python collections
- Writing Pythonic code
- Choosing the best libraries for your tasks
- Downloading webpages with requests
- Parsing HTML with Beautiful Soup
- Manipulating images with Pillow
- Making videos and drawing on maps with matplotlib
- Serving webpages with Jinja2 and Flask
- Working with Python classes
- Taking advantage of functional techniques
- Profiling CPU and memory use
- Exploiting parallelism
Skill Level Intermediate
Learning Python Web Penetration Testingwith Christian Martorella2h 49m Intermediate
1. Installation and Setup
Jupyter notebooks3m 19s
2. Writing Python Efficiently
3. Exploiting Python Libraries
4. Advanced: Python Object-Oriented and Functional Programming
5. Introduction to Performance Optimization in Python
Next steps1m 2s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.