Skip to content

Instantly share code, notes, and snippets.

@aaelamine
aaelamine / robot_pet_caring_code.py
Created March 12, 2019 20:19
Robot pet caring code - Toy Example
while True:
time = robot.updatecurrenttime()
if time == "morning":
morning_counter = 0
while pet.is_sleeping() and morning_counter < 3:
robot.comebacklater()
morning_counter += 1
@aaelamine
aaelamine / robot_pet_caring_pseudocode.txt
Last active March 12, 2019 19:59
Robot pet caring Psuedocode - Toy Example
repeat process everyday:
when it is morning time:
if the pet is sleeping, repeat:
leave for 1 hour and then come back;
until: the pet wakes up OR if the robot has left for 3 times
clean the cage and refill the food and water;
if the pet is still sleeping:
robot sends a notification to my phone: "The pet might be sick!";
when it is noon OR night time: