← IGCSE Computer Science Paper 1

Role of robots in agriculture

A robot that does farm jobs such as planting, picking, spraying and monitoring crops, e.g. fruit-picking robots, spraying drones, milking machines and soil sensors.

Understanding Role of robots in agriculture in IGCSE Computer Science Paper 1

What it does: The code shows the robot doing the milking task itself, which is the role of a milking machine on a farm. The sensor reading is checked by the control program, which then starts the watering action when the soil is too dry. Fruit-picking robots use cameras and arms to find and pick ripe fruit. Welding car doors is a role in industry, not agriculture. Crop-spraying drones fly over fields and spray crops with water, fertiliser or pesticide. A robotic vacuum cleaner is a domestic robot. Robotic milking machines attach to the cow and milk it automatically, so the farmer does not need to do it by hand.

Common mistakes: An IF statement needs THEN after its condition. The line should be IF soil_moisture < 30 THEN so the farm robot knows when to start watering. The fruit-picking robot starts at 0, so fruit > 50 is false and it would never pick anything. The condition should be fruit < 50.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 632–641) and word search (Modules 632–651).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which job is a robot doing in agriculture?
A robot arm with a camera picks ripe strawberriesA robot arm welds a car door in a factory
Matches
Fruit-picking robots plant the seeds in the field
↓
Fruit-picking robots harvest (pick) ripe fruit. They do not plant seeds, which is a different farm job done by planting robots.
Applying
Meanings
Term
agricultural robot
Meaning
A robot that does farm jobs such as planting, picking, spraying and monitoring crops, e.g. fruit-picking robots, spraying drones, milking machines and soil sensors.
Practice
moisture ← SoilSensor()
Testing
Gaps
arm.(ripefruit)
Check Answer
Spots
1IF soil_moisture < 30
2 start_irrigation()

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Jellyfish' badge — Flow Controller, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which job is a robot doing in agriculture?
A. A robot arm with a camera picks ripe strawberries ✓
B. A robot arm welds a car door in a factory
Fruit-picking robots use cameras and arms to find and pick ripe fruit. Welding car doors is a role in industry, not agriculture.
2. Which device is used to spray crops from the air?
A. A robotic vacuum cleaner
B. A crop-spraying drone ✓
Crop-spraying drones fly over fields and spray crops with water, fertiliser or pesticide. A robotic vacuum cleaner is a domestic robot.
3. True or false: a robotic milking machine can milk cows without a farmer doing it by hand.
A. False
B. True ✓
Robotic milking machines attach to the cow and milk it automatically, so the farmer does not need to do it by hand.
4. Which is a way sensors help robots to monitor crops?
A. Soil sensors measure moisture so the right amount of water is used ✓
B. Soil sensors move the plants into rows
Sensors only collect data such as soil moisture. A microprocessor uses the data and an actuator carries out an action, such as watering.
5. Which is the best example of a robot used for monitoring crops?
A. A drone with sensors that checks the health of a field ✓
B. A tractor driven by a farmer with no sensors
A robot needs sensors, a microprocessor and actuators. A tractor with no sensors that a farmer drives is not a robot.

Match the Pairs

fruit-picking robot → Uses a camera sensor to spot ripe fruit and a robotic arm to pick it gently without bruising it
crop-spraying drone → Flies over fields to spray water, fertiliser or pesticide on crops, covering large areas quickly
A robotic milking machine milks cows automatically using sensors to find the cow's udder, so farmers do not need to milk by hand → milkingRobot.attachToCow()
Soil sensors monitor crops by measuring moisture and send the readings to a microprocessor, which decides if watering is needed → IF soilMoisture < 30 THEN waterCrops()
Fruit-picking robots plant the seeds in the field → Fruit-picking robots harvest (pick) ripe fruit. They do not plant seeds, which is a different farm job done by planting robots.
Farmers must walk the fields to check soil moisture because robots cannot monitor crops → Robots can monitor crops and soil using sensors, and they send the data to a microprocessor, so walking the fields is not needed.

Key Term

agricultural robot
A robot that does farm jobs such as planting, picking, spraying and monitoring crops, e.g. fruit-picking robots, spraying drones, milking machines and soil sensors.

Fill in the Blanks

1. arm.pick(ripe_fruit) arm.place(basket)
Hint: Type the action a fruit-picking robot arm performs on ripe fruit.
2. drone.spray(crops) drone.return_home()
Hint: Type the farm job a crop-spraying drone does to the crops.
3. machine.milk(cow) machine.clean()
Hint: Type the action a robotic milking machine carries out on the cow.
4. level = sensor.read_soil()
Hint: Type the name of the input component that measures soil conditions for the control system.
5. IF moisture > 80 THEN pump.off() ENDIF
Hint: Type the comparison operator meaning 'greater than', used to stop watering when the soil is too wet.

Spot the Error

Question 1
A IF soil_moisture < 30
B start_irrigation()
C ENDIF
Line A — An IF statement needs THEN after its condition. The line should be IF soil_moisture < 30 THEN so the farm robot knows when to start watering.
Question 2
A fruit ← 0
B WHILE fruit > 50 DO
C pick_fruit()
D fruit ← fruit + 1
E ENDWHILE
Line B — The fruit-picking robot starts at 0, so fruit > 50 is false and it would never pick anything. The condition should be fruit < 50.
Question 3
A FOR row ← 1 OF 10
B fly_to(row)
C spray_crops()
D NEXT row
Line A — A count-controlled loop uses the keyword TO, not OF. The line should be FOR row ← 1 TO 10 so the spraying drone covers rows 1 to 10.
Question 4
A milk ← 0
B FOR cow ← 1 TO 20
C attach_milker(cow)
D milk ← yield(cow)
E NEXT cow
Line D — This replaces the running total with one cow's yield each time. It should add to the total: milk ← milk + yield(cow).
Question 5
A moisture ← soil_sensor()
B OUTPUT moisture
C IF moisture < 30 DO
D start_irrigation()
E ENDIF
Line C — DO is used for loops. An IF statement must use THEN, so the line should be IF moisture < 30 THEN.

Student with a class code? Join your class →