Code Monkey home page Code Monkey logo

pp2021's Introduction

USTH ICT 2021 Advanced Programming with Python

Students are expected to:

  • Fork this repository to your github account
  • Push your commits regularly, with proper commit messages

Student Info

  • Student Name: Vo Chi Dat
  • Student ID: BI9-066

Practice Session

Labwork 1: Student mark managemet

  1. Make a new Python program:
    • Name it «1.student.mark.py»
    • Use tuples, dicts, lists, NO objects/classes
    • Build a student mark management system
  2. Function: 2.1. Input Functions: * Input number of students in a class * Input student information: id, name, DoB * Input number of courses * Input course information: id, name * Select a course, input marks for student in this course 2.2. Listing functions: * List courses * List students * Show student marks for a given course

Labwork 2: OOP'ed student mark management

  1. Copy your practical work 1 to 2.student.mark.oop.py
  2. Make it OOP’ed
  3. Same functions
    • Proper attributes and methods
    • Proper encapsulation
    • Proper polymorphism

Labwork 3: Some maths and decorations

  1. Copy your practical work 2 to 3.student.mark.oop.math.py
  2. Use math module to round-down student scores to 1-digit decimal upon input, floor()
  3. Use numpy module and its array to:
    • Add function to calculate average GPA for a given student
    • Sort student list by GPA descending
  4. Decorate your UI with curses module

Labwork 4: modularization

Split your program 3.student.mark.oop.math.py to modules and packages in a new pw4 directory * input.py: module for input * output.py: module for curses output * domains: package for classes * main.py: main script for coordination

Labwork 5: persistent info

  1. Copy your pw4 directory into pw5 directory
  2. Update your input functions
    • Write student info to students.txt after finishing input
    • Write course info to courses.txt after finishing input
    • Write marks to marks.txt after finishing input
  3. Before closing your program
    • Select a compression method
    • Compress all files aboves into students.dat
  4. Upon starting your program
    • Check if students.dat exists
    • If yes, decompress and load data from it

Labwork 6: pickled management system

  1. Copy your pw5 directory into pw6 directory
  2. Upgrade the persistence feature of your system to use pickle instead, still with compression

pp2021's People

Contributors

chpiano2000 avatar gdxpub avatar

Stargazers

 avatar

Watchers

James Cloos 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.