My question is about pset2 caesar cipher. What am I supposed to do with the key? I see in some examples that students are using a keyword. But I thought I am supposed to use the key as an integer? like you write ./caesar 2.


In 'caesar' the key is a number (as per the spec); in 'vigenere' the key is a keyword.

However to specifically answer your question, the number (key) that is entered in the command line will actually be a string, so you need to convert it to an integer so you can use it in your algorithm (as the spec says).


I get it now. The keyword is used in the next program of pset2, called Vigenere. In Caeser I can still make use of an integer as a key for the program.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .