Python code challenge focusing on data structures (dictionaries and lists) to create a digital twin of a farm in Maji Ndogo. It covers representing tractors, fields, and managing vehicle fleets for agricultural automation and data science applications.
# Maji Ndogo Farm Digital Twin: Data Structures Challenge
This repository contains the solution to a graded code challenge focusing on fundamental data structures in Python, applied to a 'Digital Twin' simulation of a farm in Maji Ndogo.
The primary goal of this challenge is to lay the groundwork for an autonomous farming system by programmatically representing various farm elements and operations using Python's built-in data structures.
## Project Context
This project is part of a larger initiative to revolutionize Maji Ndogo's farming industry through data science and AI, aiming for fully autonomous farming equipment. Building a digital twin allows for simulation, analysis, and fine-tuning of agricultural processes before real-world implementation.
## Challenges Addressed
### Challenge 1: Represent a Tractor with a Dictionary
- **Task:** Create a Python dictionary to represent a farm tractor, encapsulating attributes like model, colour, horsepower, and fuel capacity.
- **Learning Outcome:** Understanding dictionary usage for structured data representation of objects.
### Challenge 2: Represent a Field
- **Task:** Use a list of lists (a 2D grid) to represent a farm field and implement a function to 'plant' a specified row by setting its elements to 1s.
- **Learning Outcome:** Working with nested lists to model grid-like structures and modifying specific elements.
### Challenge 3: Represent All Farm Vehicles
- **Task:** Develop a function to add new vehicle data (model, colour, horsepower, fuel capacity) to an existing list of vehicle dictionaries.
- **Learning Outcome:** Managing collections of structured data (list of dictionaries) and appending new entries.
## How to Use
To explore the solutions and code, you can clone this repository and open the provided Jupyter Notebook. Each challenge includes the function implementation and test cases to verify the correctness of the solutions.
Feel free to explore and adapt these foundational data struc …