<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-automated-farming-using-python-qtpzpyws6" -->

---
title: I Automated Farming Using Python | daily.dev
description: A YouTuber plays 'The Farmer Was Replaced', a game where you write Python scripts to automate farm work. He starts with a simple while-true harvest loop, then...
canonical: https://daily.dev/posts/i-automated-farming-using-python-qtpzpyws6
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I Automated Farming Using Python | daily.dev
og:description: A YouTuber plays 'The Farmer Was Replaced', a game where you write Python scripts to automate farm work. He starts with a simple while-true harvest loop, then...
og:url: https://daily.dev/posts/i-automated-farming-using-python-qtpzpyws6
og:image: https://api.daily.dev/og/posts/qtPzpyws6.png
og:image:alt: I Automated Farming Using Python
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I Automated Farming Using Python

**[Indently](https://daily.dev/sources/indently)** · 12 min read · 0 upvotes · 0 comments

## Summary

A YouTuber plays 'The Farmer Was Replaced', a game where you write Python scripts to automate farm work. He starts with a simple while-true harvest loop, then unlocks upgrades like speed, hats, planting, and expanding the farm grid to 3x3. He hits a problem where the drone harvests faster than crops grow and fixes it with an if-can-harvest check, then struggles with nested while loops and move commands to cover multiple tiles, landing on an if/else workaround. He calls it a possibly steep learning curve for non-programmers but says it's fun and may make follow-up videos. He also discloses that the game copy was sent to him for free, which legally makes this a paid promotion.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=hOOn2L3tjw4>

## Questions this post answers

### What is The Farmer Was Replaced and how does the Python scripting work in it?

The Farmer Was Replaced is a game where you write Python code to automate a farming drone. You start with no unlocked functions and must manually harvest to earn materials, then spend them in a tech tree to unlock things like the while loop, if statements, print, move commands, and planting. Early automation covers basic harvesting, then expands to handling crop growth timing and multi-tile movement.

_Developers curious about learning Python through games can find hands-on project writeups like this on daily.dev._

## Similar posts on daily.dev

- [Creating a Monster Collector Game with Farming Elements](https://daily.dev/posts/creating-a-monster-collector-game-with-farming-elements-r0xta1b21) · 80 LEVEL · 78 upvotes · 0 comments
- [An Interactive Tomato Farm Overseen By AI](https://daily.dev/posts/an-interactive-tomato-farm-overseen-by-ai-xlkm7gmqv) · Hackaday · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#game-development](https://daily.dev/tags/game-development)

[View this post on daily.dev](https://daily.dev/posts/i-automated-farming-using-python-qtpzpyws6)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I Automated Farming Using Python","url":"https://daily.dev/posts/i-automated-farming-using-python-qtpzpyws6","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-automated-farming-using-python-qtpzpyws6"},"datePublished":"2026-11-07T22:11:02.535Z","dateModified":"2026-11-07T22:11:23.987Z","description":"A YouTuber plays 'The Farmer Was Replaced', a game where you write Python scripts to automate farm work. He starts with a simple while-true harvest loop, then...","image":"https://i.ytimg.com/vi/hOOn2L3tjw4/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/hOOn2L3tjw4/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Indently","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Indently","logo":"https://media.daily.dev/image/upload/s--u6wAXJI9--/f_auto/v1725038127/logos/indently","url":"https://daily.dev/sources/indently"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-automated-farming-using-python-qtpzpyws6","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,game-development","timeRequired":"PT12M","video":{"@type":"VideoObject","name":"I Automated Farming Using Python","description":"A YouTuber plays 'The Farmer Was Replaced', a game where you write Python scripts to automate farm work. He starts with a simple while-true harvest loop, then...","thumbnailUrl":"https://i.ytimg.com/vi/hOOn2L3tjw4/sddefault.jpg","uploadDate":"2026-11-07T22:11:02.535Z","duration":"PT12M","url":"https://api.daily.dev/r/qtPzpyws6","embedUrl":"https://www.youtube.com/embed/hOOn2L3tjw4"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Indently","item":"https://daily.dev/sources/indently"},{"@type":"ListItem","position":3,"name":"I Automated Farming Using Python"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/i-automated-farming-using-python-qtpzpyws6#faq","mainEntity":[{"@type":"Question","name":"What is The Farmer Was Replaced and how does the Python scripting work in it?","acceptedAnswer":{"@type":"Answer","text":"The Farmer Was Replaced is a game where you write Python code to automate a farming drone. You start with no unlocked functions and must manually harvest to earn materials, then spend them in a tech tree to unlock things like the while loop, if statements, print, move commands, and planting. Early automation covers basic harvesting, then expands to handling crop growth timing and multi-tile movement. Developers curious about learning Python through games can find hands-on project writeups like this on daily.dev."}}]}
```

