Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
5th Edition
ISBN: 9780134801155
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 7, Problem 3DE

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

Blurred answer
Students have asked these similar questions
Lab Activity for the students: Exercise 5: Write a program that asks the user to input a letter. The program finds and prints if the letter is uppercase or lowercase. Then, the program asks the user to input a string and get a three-character substring from the beginning of the string. (1 Mark ) Example : If the inputs are 'y' and "Community". Then, the program will print: y is lowercase The substring is: Com
Java language kindly simulate it on netbeans Thanks
3. Random Symbol Guessing Game Write a program that generates a random symbol and asks the user to guess what the symbol is. If the user's guess has a higher ASCII number than the random symbol, the program should display "Symbol ASCII too high, try again." If the user's guess has a lower ASCII number than the random symbol, the program should display "Symbol's ASCII too low, try again." The program should use a loop that repeats until the user correctly guesses the random symbol.

Chapter 7 Solutions

Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Python Tutorial #10; Math Functions in Python; Author: Art of Engineer;https://www.youtube.com/watch?v=OviXsGf4qmY;License: Standard YouTube License, CC-BY