Showing posts with label 01A. Show all posts
Showing posts with label 01A. Show all posts

Sunday, July 12, 2009

01A - Diana Perez - Make capuccino


function fillBoiler:
with cup
fill with coldMilk
get boiler
place boiler right to cup
with cup
move 20cm up
turn -90°
if cup = „empty“
turn 90°
move 20cm down
execute function boilMilk

function boilMilk:
get boiler
put boiler on heater
turn heater.switch to „on“
desiredTime = 5min
when desiredTime:
turn heater.switch to „off“
execute function putCapuccino

function putCapuccino:
get cup
desiredCapuccino = 2
desiredSugar = 2
execute function fillCup

function fillCup:
get cup
place cup right to boiler
with boiler:
move 20cm up
turn -90°
if cup = „full“
with boiler:
turn 90°
move 20cm down

finish

Monday, June 8, 2009

Assignment 01 A Pseudo Code

for humans

boil the water
put rice in the water
wait 20 min

for computer

function boilWater:
with waterBoiler
fill with coldWater
if waterBoiler = full:
stop fill
turn waterBoiler.switch to „on“
when waterBoiler.switch = „off“:
execute function fillPot

function fillPot:
get pot
place pot right to waterBoiler
with waterBoiler:
move 30cm up
turn -90°
if pot = „full“
with waterBoiler:
turn 90°
move 15cm down
execute function makeRice

function makeRice:
desiredRice = 200
desiredTime = 20min
get rice
with rice:
place inside pot

start counting time
if time = 20min:
put pot in initial position
when waterBoiler.switch = „off“:
finish

Sunday, May 24, 2009

01A - Deborah Kaiser - making rice

Sorry it is so overdo, i was not getting the e mails...

function cook rice:

function fillCup:
get cup
get rice bag
place cup right to rice bag
with rice bag:
move 20cm up
turn -90°
if cup = „full“
with rice bag:
turn 90°
move 20cm down

with cup:
get pan
turn 90°
let all content fall into pan


function fillCup:
get cup
get water jar
place cup right to water jar
with water jar:
move 20cm up
turn -90°
if cup = „full“
with water jar:
turn 90°
move 20cm down

with cup:
get pan
turn 90°
let all content fall into pan



execute function makeRice

function makeRice:
desiredSalt = 2
desiredTime = 10 min

get pan
with pan:
place on burner
turn burner on

start counting time
if time = 10min:
turn burner off

finish

Monday, May 4, 2009

clau.pseudo-code again

I realized what the problem was with my code flow and here I fix it. I hope it is ok. Again I have problems with identation, I don´t know how to controll it in order to have desired order of functions

Buy a train ticket to Berlin in a ticket-vending machine.

For humans
Go to the ticket machine
Press the button Ticket- Reservation
Select the departure and destination cities
Select the date and time
Select the number of travelers
Select the means of transport
Press search button
Select the journey that fit best with your request
Press purchase button and proceed to buy the ticket


For computers
function informationRequest:
with ticketMachine
press ticketMachine.monitor
select ticketReservation.button
press departure.button
with the keyboard on the monitor
write Dessau
press DessauHbf.button
press destination.Key
with the keyboard on the monitor
write Berlin
press BerlinHbf.button
desiredDay = Today
desiredTime = 23:00
desiredTravelers = Adult
desiredTravelers.number = 1
desiredTravel.class= secondClass
desiredMeansTransport = localTransport
press search.button
execute function selectionJourney

function selectionJourney:
on standardFare.column and
along dep 23.17 arr 01:06.row
press purchase.button
execute function buyTicket

function buyTicket:
get credit.Card
with credit.Card
move 20 cm right
move 5 cm up
insert credit.Card inside ticketMachine.slot

when hear “beep” sound
remove creditCard
put creditCard in initial position
with keyboard near ticketMachine.slot
write creditCard.pinCode
press B button
wait monitor change image
move 60 cm down
open window
remove ticket
execute function remove ticket
else:
finish

Thursday, April 30, 2009

scipting assignment1

Frying two Eggs

For humans:
Open the eggs
Put some oil inside the pan
Put eggs in when the oil is hot
Put in some salt
Wait for five minutes

For computer:
function taking out eggs:
take two eggs out of the box
if the oven switch = off
switch it to “on”

function switching on the oven:
if the oven switch=off
switch the oven to “on”

function putting in oil:
put the pan on top of the oven
open the oil bottle
put 20ml oil inside the pan
if the time=2 minutes

function putting the eggs in:
get the eggs
open the shell of one egg
place it inside the pan
open the shell of another egg
place it inside the pan
start counting time

function adding some salt:
if the desired salt>0
get the salt bag
open the salt bag
place 2mg on the top of one egg
place 2mg on the top of another egg
if time=5 minutes
else:finish

Sunday, April 26, 2009

assignment I

have a bath
##########################
human instruction
open geyser to boilwater
take a bath
dry body
####################
computer instruction
function boilwater
with geyser
set up the temperature
turn geyser.switch to "on"
when geyser.temple = 50
execute function have a shower
function take a bath
place body in bath
open geyser tap
if all body be covered by water = yes
turn off geyser tap
start counting time
if time = 15min
execute function dry body
function dry body
desiredbodyhumidity = 5%
desiredglobonskin = 0
get body out of bath
use bath towel wipe body
if desiredbodyhumidity > 5%
execute function dry body
if desiredglobonskin > 0
execute funcion dry body
else:
finish

01A_BEDZRA_Pseudo-Code: washing a plate

for humans

make soapy water
put plate in
scrub
rinse plate with fresh water

for a computer

function make soapyWater:
with kitchenSink
cover wasteWater drain
turn coldWater tap to ,,on"
if kitchenSink = 25%full:
turn coldWater tap to ,,off"
lift liquid soap
with liquidSoap:
position over kitchenSink
turn -180°
add 4 drops to coldWater
turn 180°
place on counterTop
stair coldWater
execute function putPlate

function putPlate:
lift plate
position plate over kitchenSink
lay gently in kitchenSink
execute function scrubPlate

function scrubPlate:
get sponge
with Sponge:
dip in soapyWater
stroke over plateSurfaces
place on counterTop
execute function rinsePlate

function rinsePlate:
open wasteWater drain
when wasteWater = 0:
cover wasteWater drain
turn coldWater tap to ,,on"
if kitchenSink = 50%full:
turn coldWater tap ,,off"
move plate in coldWater
If plateSurfaces = clean:
place on counterTop
finish

Saturday, April 25, 2009

boiling noodles

FOR PEOPLE:
boil the water
put noodles into the water
put them in a plate
add sauce if you want
FOR COMPUTER:
function boilWater:
with waterBoiler,
fill with cold water,
if waterBoiler=full:
stop fill
turn water Boiler switch to"on"
when water boiling
execute function put Noodles
function put Noodles:
desiredTime=10min
get noodles
with noodles:
place inside waterBoiler
start counting time
when Time=10min
turn waterBoiler switch to off
execute function fill plate
function fill Plate
get plate
place plate right to waterBoiler
with water Boiler:
move 20cm up
turn-90
if plate="full"
with waterBoiler:
turn90
move 20cm down
execute function add Sauce
finction add Sauce
desired Sauce=1
get sauce
with sauce
place inside plate
if desired Sauce>0
execute function add sauce
else:
finish

Pseduo-Code

Pseudo-Code for how to follow our Generative Scripting I


For humans:

Take a laptop to get Internet
Register account in Google Website
Follow the Generative Scripting I


For computer:

Function get Internet:
With a computer
Press on-off of computer
Desired time= 2 min
If desired time < 2:
Enter Windows system
Else:
Reopen
Cable plug in
Open the Internet window
Input "www.Google.com" into Address field
Press "Enter"
Desired time = 5 sec
If desired time < 5 sec:
Connect the Internet
Else:
Reconnect
Execute function register account
Function register account
Click "sign in"
Input Email address
Press "Tab"
Input password
Click “sign in”
Desired time = 5 sec
If desired time < 5 sec:
Register done
Else:
Rewrite User name (Email) and Password
Execute function register account
Function follow the Scripting I Group
Input the "http://gs-i blogspot.com" into address filed
Press "Enter"
Click "view blog"
Click "Follow"
Input email and password
Click sign in
Desired time = 5 sec
If desired time < 5 sec:
Execute function follow Scripting I Group
Else:
Finish.

Friday, April 24, 2009

clau.pseudo-code

Although I tried many times that the format looked nicer (using/not using tab) with the Format for blogging, I couldn´t achieve it. I don´t know what is the mistake. But here is the exercise.

Buy a train ticket to Berlin in a ticket-vending machine.
For humans
Go to the ticket machine
Press the button Ticket- Reservation
Select the departure and destination cities
Select the date and time
Select the number of travelers
Select the means of transport
Press search button
Select the journey that fit best with your request
Press purchase button and proceed to buy the ticket


For computer
function informationRequest:
with ticketMachine
press ticketMachine.monitor
select ticketReservation.button
press departure.button
with the keyboard on the monitor
write Dessau
press DessauHbf.button
press destination.Key
with the keyboard on the monitor
write Berlin
press BerlinHbf.button
desiredDay = Today
desiredTime = 23:00
desiredTravelers = Adult
desiredTravelers.number = 1
desiredTravel.class= secondClass
desiredMeansTransport = localTransport
press search.button
execute function informationRequest

function selectionJourney:
on standardFare.column and
along dep 23.17 arr 01:06.row
press purchase.button
execute selectionJourney

function buyTicket:
get credit.Card
with credit.Card
move 20 cm right
move 5 cm up
insert credit.Card inside ticketMachine.slot

when hear “beep” sound
remove creditCard
put creditCard in initial position
with keyboard near ticketMachine.slot
write creditCard.pinCode
press B button
wait monitor change image
move 60 cm down
open window
remove ticket
execute buyTicket
else:
finish

Code for Making a B.L.T. Sandwich