Serial input

If I assign two variables values, how would I set it up so serial would take that input? Let's say I said

int no = 1; int yes = 0;

. If I did that, how could I get serial to recognize yes or no if I typed them in and add that to an unsigned string.

P.S. I know Python, but I'm a complete beginner when it comes to programming for the Arduino.

Let's say I said...

I'm following that...

If I did that, how could I get serial to recognize yes or no if I typed them in and add that to an unsigned string.

I'm not following that. Typed what in where?

Strings are NULL terminated arrays of characters. They are neither signed or unsigned.

Let's say you try again to explain the question. Please.

In order to recognize "keywords" input from the serial port, you have to assembled individual bytes from Serial.read() into a string, and write code to compare the string against a table of strings in your sketch. Essentially, you write a whole "parser."

I take it that this is easier in Python?

So it is much easier to just use 0 or 1 and then use that in the rest of your program!

You can then make a variable e.g.:

int input = Serial.read();

if (input == yes) {

}
if (input == no) { //could be done of couse also with else

}