JSON Dictionary to Object Mapping

Medium Design Patterns & Final Challenges
Solve in Playground →

Problem Statement

Create a `Student` class. Read a strict JSON string mapping a student’s attributes. Use `json.loads` to parse it into a dictionary, then instantiate the `Student` dynamically using dictionary unpacking (`**data`). Print the student’s fields.

Input Format

A single line containing valid JSON.

Output Format

Print the extracted data.

Constraints

None

Sample Input

{"name": "Alice", "score": 95}

Sample Output

Student: Alice
Score: 95

Explanation

Dictionary unpacking (**kwargs) allows seamless transition from parsed JSON endpoints into strict Python Object constructs.

Starter Code

import json

class Student:
    pass

if __name__ == '__main__':
    # Read JSON, unpack into object, print output
    pass

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used