Introduction To Computing Lecture 4 + HW#2: Week 2
Introduction To Computing Lecture 4 + HW#2: Week 2
Week 2
Fall 2015
Department of Computing
The School of EE & Computing
Adama Science & Technology University
OUTLINE ASTU
Conditionals
While-loops
Practice
ASTU
hubo.front_is_clear() False
hubo.left_is_clear() True
hubo.right_is_clear() True
ASTU
To create a grid
create_world(avenues = 9, streets = 7)
PRACTICE ASTU
PROBLEM 8: HARVEST4*
Modify your program for the Harvest2 task so that the
program works for the world harvest3.wld. Note that the
new program should also automatically work for the original
harvest.wld world.
PROBLEM 9: PLANT1
Write a program that will plant potatoes so that the
field will look like harvest1.wld at the end. Hubo
should skip any spot where there already is a
potato. (Note that you have to create your robot
with sufficiently many beepers by using hubo =
Robot(beepers=36).
hurdles1.w ld
hurdles2.w ld
hurdles3.w ld
ASTU
hurdles1.w ld
hurdles2.w ld
hurdles3.w ld
streets
Summary