Giter VIP home page Giter VIP logo

inclusion-cloud-python-test's Introduction

Python Developer Test Questions

Question 1

Create a base class with:

  • Three properties initialized at construction
  • One empty classmethod
  • One empty instance method

Question 2

Create a derived class from the base class

  • Inherits all properties and methods from the base class
  • Initialize the properties differently from the base class
  • Add code to the empty methods

Question 3

Use list comprehension and a lambda function to extract all of the even integers out of a list of integers

Question 4

Use the next() function to find the first element in a list of dictionaries whose attribute โ€˜xโ€™ = 5. Default to an empty dictionary if not found.

Question 5

Given the following JSON document:

{
    "claimId": "99999-100000",
    "payee": {
        "id": 9999,
        "role": "Payee"
    },
    "claimDateTime": 1634860244000,
    "invoiceCount": 7,
    "status": "LoadComplete",
    "invoiceIds": [
        "XXA15839",
        "XXA25829",
        "XXA35832",
        "XXA45830",
        "XXA55831",
        "XXA65833",
        "XXA75834"
    ],
    "jobNumber": 100000,
    "fileName": "XXXXXX20211021235044.xml",
    "fileId": 99999,
    "fileDateTime": 1634860244000,
    "receivedDateTime": 1634922275533,
    "process": "TRANSACT",
    "transmitterId": "XXX",
    "retailerId": "RETAILERID",
    "plantName": "XXX1",
    "totalStoreCount": 2,
    "totalOfferCount": 21,
    "totalRecordCount": 27,
    "totalCouponCount": 166,
    "totalFaceValueAmount": 445.58
}
  • Read in the document from a file
  • Find and print:
    • The Payee ID value
    • Any invoices that contain the text "583"
  • Change any date/time fields to text in the format %Y-%m- %dT%H:%M:%S
    • Hint: The format of the date/time fields are integer timestamp. To create a datetime object from an integer timestamp, use the following:
    • datetime_obj = datetime.datetime.fromtimestamp(integer_timestamp / 1e3)
  • Write the json document back out to a new file

inclusion-cloud-python-test's People

Contributors

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