Git Product home page Git Product logo

py-quiz's Introduction

pyquiz

Hone your Python skills

This quiz set is based on a quiz set from a Ruby SaaS course in the university of Berkley.

Instructions

  1. Clone this repo
  2. Make a new branch to answer the quizes
  3. Start to code
  4. When your in the green and proud of your code push it.
  5. Refactor whenever you want and update your branch.
  6. After answering see how others did it.

Invoke

To test a specific quiz use this shortcut invoke test --quiz=THEQUIZNUMBER. Even shorter inv test -q THEQUIZNUMBER. You can run inv to run all.

General Objective

Learn new skills in python and the art of refactoring. By doing these quizes you should learn to work in a more pythonic way. Answer the questions, then refactor what you did to be more pythonic. Because refactoring is important here, when refactoring you shouldn't feel obligated to git commit -a --amend. Just commit and see where your code starts and how it transforms.

Goals By Quiz

Quiz 1

The first quiz should let you see different ways of manipulating strings. Strings can be iterated, sliced, manipulated with regex, and has it's own helpful slew of methods. To get the most out of this quiz use a python console (ipython suggested) to try all forms of manipulating strings.

Quiz 2

The point of this quiz is learn to reduce if statements. The soltion can be reduced to one if else statement per our two functions.

  • Know a python idiom is to ask forgiveness not permission.
Quiz 3

Play with Collections/ Iterables.

Lists, strings, dictionaries, comprehension, generators python is strong at iterating through data. Useful mentions: ''.join builtin => Python builtin functions like filter, reduce, sorted, set, plus more comprehension => there is comprehension for lists, dicts, generators, and more

Quiz 4

Starts you off using classes, inheritance, and properties.

Quiz 5

This quiz explores decorators and metaprogramming.

Quiz 6

This quiz should be solved in a single iteration. You will use method chaining, caching, lazy iteration (genarators), higher order functions, and how to create a DSL.

py-quiz's People

Contributors

avraf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.