GithubHelp home page GithubHelp logo

janthemanson / milestoneproject1-python-course-by-teclado Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 35.54 MB

A simple (temporary store) movie collection app, where users can add, list and search for movies, refactored code.

Python 97.68% Nix 0.01% PowerShell 0.05% Shell 0.02% Cython 0.68% C++ 0.27% C 1.29% Fortran 0.01% Nu 0.02%

milestoneproject1-python-course-by-teclado's Introduction

Milestone project 1 - The complete python course by teclado

A simple (temporary store) movie collection app, where users can add, list and search for movies.

Code was refactored like suggested in lecture 57.

Search function has 2 more features ๐Ÿ˜‡.

  1. Making search not case sensitive:

    When transforming "search input" and "movie title" with .lower() to lowercase, case sensitivity is eliminated.

  2. Display message if search can't find the movie:

    For this I set a boolean of found which is set to True when the loop matches a movie. If not, message is displayed.

def movie_search():
    search = input("Search movies by title: ")
    found = False
    for movie in movies:
        if search.lower() == movie['title'].lower():
            found = True
            print_movie(movie)
    if not found:
        print(f"Movie not found. Try another title!")

milestoneproject1-python-course-by-teclado's People

Contributors

janthemanson avatar

Watchers

 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.