I need to write a program that checks if first name and last name are correctly typed in, the program need to checks if first letter of name is uppercase, it return "Correct", if it's not it returns "Incorrect" same for last name.
I managed to write code that does this but only for first name, and i have problem, when i write name for example JOHN it says "correct", same for John. The only correct thing would be ex John Smith.
I searched google a lot but could not find anything on this.
easiest thing would be to ask the user for their first name and perform your test (like you are doing), and then repeat the question but ask for the user's surname and perform the same test. i.e. wrap up the testing code into a function.
easiest thing would be to ask the user for their first name and perform your test (like you are doing), and then repeat the question but ask for the user's surname and perform the same test. i.e. wrap up the testing code into a function.
Yeah i can do that, but my main problem for now is that this code returns "correct" for JOHN and John when only correct thing would be John, this is just example for a name.