The following pseudocode works, but it performs a case-sensitive validation of the user’s input. How could the algorithm be improved so the user does not have to pay attention to capitalization when...


The following pseudocode works, but it performs a case-sensitive validation of the user’s input. How could the algorithm be improved so the user does not have to pay attention to capitalization when entering a name?


// This program asks the user to enter a string


// and validates the input.


Declare String choice


// Get the user's response.


Display "Cast your vote for Chess Team Captain."


Display "Would you like to nominate Lisa or Tim?"


Input choice


// Validate the input.


While choice != "Lisa" AND choice != "Tim"


Display "Please enter Lisa or Tim."


Display "Cast your vote for Chess Team Captain."


Display "Would you like to nominate Lisa or Tim?"


Input response


End While



Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here