logo

Crowdly

Browser

Додати до Chrome

Advanced Python with Django Framework

Шукаєте відповіді та рішення тестів для Advanced Python with Django Framework? Перегляньте нашу велику колекцію перевірених відповідей для Advanced Python with Django Framework в softserve.academy.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Class can contain only one method __enter__(self) to be Context manager?

33%
67%
Переглянути це питання

The process of pickling in Python includes:

Переглянути це питання

Operator with applies only for work with files?

33%
67%
Переглянути це питання

For reading xml-format we can use method loads from module xml

33%
67%
Переглянути це питання

For reading json-format we can use method loads from module json

100%
0%
Переглянути це питання

For reading from csv-format we can use  method loads from csv module

33%
67%
Переглянути це питання

Operator with can be applied for any iterable object 

33%
67%
Переглянути це питання

What is the output the following?

list = ["item1", 1, "item3"]   # line 1

with list as a:                   # line 2

    print(a)                        # line 3

Переглянути це питання

  1. Follow the link: https://classroom.github.com/a/1a2Fc0jK

  2. After the repository is created, clone it locally:

    git clone <your repository URL>

     

  3. Implement the following task in the university.py file:

          You are given two JSON files:

    • users.json — contains information about users in the following format:

                 [ { "id": 1, "name": "userName", "department_id": 1 }, ... ]

    • departments.json — contains information about departments in the following format:

      [ { "id": 1, "name": "departmentName" }, ... ]          

          Create appropriate JSON Schemas to validate the structure of users.json and  departments.json.

           Implement the functions:

  • user_with_department(csv_file, user_json, department_json):

                    This function should:

      • Read data from the provided JSON files.

      • Create a CSV file with the following format:

          header line - name, department

          next lines :  <userName>, <departmentName>

      • If a user refers to a department_id that doesn't exist in departments.json, raise a DepartmentName exception.

      • If the data does not match the schema, raise an InvalidInstanceError exception.

 

  • validate_json(data, schema):

which validates a JSON instance against a schema.

  1. Commit and push your solution to the GitHub repository.

Переглянути це питання

What will the output be from the following code?

0%
0%
0%
0%
Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на softserve.academy?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome