Git Product home page Git Product logo

pypart7's Introduction

Part 7

Accompanying resources

Exercise 1

Open the program called multilingual_greeter.py

  • For each function, remove the line containing the pass statement and implement the functionality described in the docstrings.
  • Run the unit tests to validate that the implementation passes unit tests.
python3 -m unittest test_multilingual_greeter.py

Once all tests are passing, you should be able to run the program. multilingual_greeter

Exercise 2

Create a program called multilingual_greeter_v2.py

Extend the functionality from exercise 1 so it meets the following requirements:

  • When the application is executed, the user is prompted for admin mode or user mode.
  • In admin mode, the user is given the choice perform the following actions:
    • Add support for additional languages.
    • Update greetings for existing languages.
  • Be sure to create tests for all new functionality.
  • Be sure to enhance existing tests where appropriate.

Exercise 3

Create a program called multilingual_greeter_v3.py

Extend the functionality from exercise 2 to meet the following requirements:

  • Each key in the greetings dictionary is associated with a list rather than a string.
  • Each list should contain at least 3 greetings per language.
  • The greet function will select a random item from the list when invoked.
  • Ensure appropriate support for these new features while in admin mode.
  • As always, be sure to include appropriate test coverage.

pypart7's People

Contributors

xt0fer 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.