Code Monkey home page Code Monkey logo

python-basic's Introduction

BÀI TẬP

LUYỆN TẬP

  1. Vẽ lược đồ giúp kiểm tra các số nguyên tố trong 1 mảng (gọi tới hàm kiểm tra số nguyên tố, có lược đồ riêng).

  1. Cho 1 danh sách các giá cổ phiếu theo ngày:
  • Vẽ lược đồ để kiểm tra xem giá của ngày thứ i+1 là tăng hay giảm so với ngày trước đó.
  • Phân ra 3 trường hợp:
    • Nếu tăng trên 7%: ra lệnh bán.
    • Nếu giảm trên 5%: ra lệnh mua.
    • Còn lại: giữ nguyên.

THỰC HÀNH

  1. Dữ liệu giá cổ phiếu: viết vòng lặp xác định nếu giá cổ phiếu lên 7% so với ngàyhôm trước thì bán, xuống 5% so với ngày hôm trước thì mua... gia_theo_ngay = [10.1, 9.5, 10.7, 10.8, 10.6, 10.0, 10.2, 9.5]
  2. Viết chương trình kiểm tra xem mỗi số trong một list có là số nguyên tố hay không (cần viết hàm kiểm tra số nguyên tố riêng và lưu ý trường hợp các số 1, 2, 3).
  3. Viết hàm tính tiền bảo hiểm và thuế thu nhập cá nhân cho các nhân viên:
    • Input: lương, phụ cấp
    • Output: BH, PIT

python-basic's People

Contributors

tynab avatar

Stargazers

 avatar  avatar

Watchers

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