The Lady or the Tiger

The lover open the right door. It was the lady who is behind the door, the tiger-keeper didn’t lie, nor did the princess. Although she doesn’t want her lover to marry other women, but she also didn’t want him to die. After lady walk out the door, the king had annouce that she will soon marry the lover.The princess run away after she hear the new and tiger-keeper went to chase the princess. All that the lover could do is watching them gone away because he know the moment he open the door that princess told him, he had lost his chance to love the princess.

movingG1

// This Processing program creates a little animation machine
// with controls that you can customize.
// First, we need to “declare” a few variables of 3 different types.
int bDia, cDia, mvX, mvY;
float cX, cY, clickX, clickY;
color cCol;

void setup() {
size(201, 400); // Create a program window 201 pixels wide and 400 pixels high.
stroke(127); // Set the color for the outlines of our shapes.
bDia = 20; // Set the diameter of our circular control buttons.
cDia = 20; // Set the diameter of the “action circle” we will control.
cX = 100; // Set the starting horizontal position of the action circle.
cY = 300; // Set the starting vertical position of the action circle.
cCol = color(255, 255, 255); // Set the starting color of the action circle.
mvX = 0; // Set the horizontal movement of the action circle.
mvY = 0; // Set the vertical movement of the action circle.
}
void draw() {
// These first 4 lines let you use math coordinates instead of computer coordinates.
scale(1, -1);
translate(0, -height);
clickX = mouseX;
clickY = height – mouseY;

fill(255); // Color the screen white.
rect(0, 200, 200, 200); // Draw the square “action screen”.

ellipse(100, 60, bDia, bDia); // Draw the bottom button.
ellipse(100, 100, bDia, bDia); // Draw the middle button.
ellipse(100, 140, bDia, bDia); // Draw the top button.
ellipse(60, 100, bDia, bDia); // Draw the left button.
ellipse(140, 100, bDia, bDia); // Draw the right button.

if (cY+cDia/2>399){
cY=399-cDia/2;
mvY=-(mvY);
cCol=color(255,0,0);
}
else if (cY-cDia/2<201){
cY=201+cDia/2;
mvY=-(mvY);
cCol=color(0,0,255);
}

if (cX+cDia/2>199){
cX=199-cDia/2;
mvX=-(mvX);
cCol=color(150,0,200);
}
else if (cX-cDia/2<1){
cX=1+cDia/2;
mvX=-(mvX);
cCol=color(200,0,150);
}

fill(cCol); // Set the color for the action circle.
cX = cX + mvX; // Set the horizontal position of the action circle.
cY = cY + mvY; // Set the vertical position of the action circle.

// The 2 “print lines” below will display at the bottom of this window.
// They will let us check the coordinates of the action circle.
println(“X =”, cX);
println(“Y =”, cY);

ellipse(cX, cY, cDia, cDia); // Draw the action circle.
}

void mousePressed() {
//Check if the user clicked the middle button.
if (dist(clickX, clickY, 100, 100) < bDia/2) {
mvX=0;
mvY=0;
// If so, turn the action circle red.
}

//Check if the user clicked the top button.
else if (dist(clickX, clickY, 100, 140) < bDia/2) {
mvY = 1;
//If so, make the action circle move upwards.
}
//Check if the user clicked the bottom button.
else if (dist(clickX, clickY, 100, 60) < bDia/2) {
mvY = -1;
//If so, make the action circle move upwards.
}
//Check if the user clicked the right button.
else if (dist(clickX, clickY, 60, 100) < bDia/2) {
mvX = -1;
//If so, make the action circle move upwards.
}
//Check if the user clicked the left button.
else if (dist(clickX, clickY, 140, 100) < bDia/2) {
mvX = 1;
//If so, make the action circle move upwards.
}

}

Bernie.bas

050 REM bernie.bas by chen
100 PRINT “You are Tom at Miller’s Crossing where”
101 PRINT “you must decide whether or not you will kill Bernie.”
150 REM QUESTION 1
200 PRINT “Did you kill Bernie?”
225 PRINT “(please answer only with yes or no)”
250 INPUT murder$
260 IF murder$= “yes” OR murder$= “no” THEN GOTO 300
270 GOTO 200
290 REM QUESTION 2
300 PRINT “Can you outsmart Casper?”
325 PRINT “(please answer only with yes or no)”
350 INPUT smart$
360 IF smart$=”yes” OR smart$= “no” THEN GOTO 400
370 GOTO 300
400 IF murder$= “yes” AND smart$= “yes” THEN GOTO 500
425 IF murder$= “yes” AND smart$= “no” THEN GOTO 600
450 IF murder$= “no” AND smart$= “yes” THEN GOTO 700
475 IF murder$= “no” AND smart$= “no” THEN GOTO 800
500 PRINT “Casper will end up working for you.”
550 GOTO 1000
600 PRINT “You will end up working for Casper.”
650 GOTO 1000
700 PRINT “You will get Verna.”
750 GOTO 1000
800 PRINT “You will get kill.”
1000 END

Syllogism

 

Conditional 1: IF it is a square(A), THEN it is four sided(B).

Conditional 2: IF it is four side, THEN it is polygon(C).

IF square are four sided AND four sided is polygon. THEN square are polygon.   Syllogism

IF square are four sided AND square are polygon. THEN four sided are polygon.   Void

IF square are four sided AND square are polygon. THEN polygon are four sided.   False

 

Conditional 1: IF  it is a tall people(A), THEN it is a basketball player(B).

Conditional 2: IF it is a baketball player, THEN it is a athlete(C).

IF tall people are basketball player AND basketball player are athlete. THEN tall peopel are athlete.      Syllogism

IF tall people are basketball player AND tall peope are athlete. THEN basketball player are athleth.    Void

IF tall people are basketball player AND tall people are athlete. THEN athlete are baskeball player.    False