Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 4, Problem 17RQ
Program Description Answer
Nested selection structure appears in either of an outer selection structure’s paths.
Hence, the correct answer is option “C”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Question text
Determine whether the ff hypotheses about a computer
program
• There is an undeclared variable or there is a syntax
error in the first five lines.
• If there is a syntax error in the first five lines, then there
is a missing semicolon or a variable name is
misspelled.
• There is not a missing semicolon.
• There is not a misspelled variable name.
lead to the conclusion
• There is an undeclared variable.
Let the following symbols represent the corresponding
statements:
uv - There is an undeclared variable.
se - There is a syntax error in the first five lines.
ms - There is a missing semicolon.
vm - There is a misspelled variable name.
Thus, in symbolic form, we have to show whether the
argument below is valid:
uv V se
se → (ms V vm)
~ ms
~ VM
... uv
VBA - EXCEL
Engine – optional – this indicates the solving method that needs to be used to get to a solution. 1 for the Simplex LP method, 2 for the GRG Nonlinear method, or 3 for the Evolutionary method. This corresponds to the Select a Solving Method dropdown list in the Solver Parameters dialog box
EngineDesc – optional -this is an alternate way of selecting the solving method – here you would type the strings “Simplex LP”, “GRG Nonlinear” or “Evolutionary”. This also corresponds to the Select a Solving Method dropdown list in the Solver Parameters dialog box
What happens when the code demonstrates:
Engine:=1, EngineDesc:="GRG Nonlinear" ?
check_game_over(): as the name suggests, this function should check to see if the game is over (if one side has no stones left in all of its pockets). It takes as an argument the game board and should return True if the game is over and False otherwise.
Chapter 4 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 4 - Prob. 1MQ1Ch. 4 - Prob. 2MQ1Ch. 4 - Prob. 3MQ1Ch. 4 - Prob. 1MQ2Ch. 4 - Prob. 2MQ2Ch. 4 - Prob. 3MQ2Ch. 4 - Prob. 4MQ2Ch. 4 - What is the opposite of greater than?Ch. 4 - Prob. 1MQ3Ch. 4 - Prob. 2MQ3
Ch. 4 - Prob. 3MQ3Ch. 4 - Prob. 4MQ3Ch. 4 - Prob. 1MQ4Ch. 4 - Prob. 2MQ4Ch. 4 - Prob. 3MQ4Ch. 4 - Prob. 1MQ5Ch. 4 - Prob. 2MQ5Ch. 4 - Prob. 3MQ5Ch. 4 - Prob. 1MQ6Ch. 4 - Jake’s Car Rental charges each customer a daily...Ch. 4 - Prob. 1MQ7Ch. 4 - Prob. 2MQ7Ch. 4 - Write a Case clause that specifies all numbers...Ch. 4 - Prob. 1MQ8Ch. 4 - Prob. 2MQ8Ch. 4 - Prob. 3MQ8Ch. 4 - A form contains six radio buttons. Three of the...Ch. 4 - Which property of the KeyPress procedures e...Ch. 4 - Which property of the KeyPress procedure’s e...Ch. 4 - Prob. 3MQ9Ch. 4 - Prob. 4MQ9Ch. 4 - Prob. 5MQ9Ch. 4 - Prob. 1RQCh. 4 - Prob. 2RQCh. 4 - Prob. 3RQCh. 4 - Prob. 4RQCh. 4 - Prob. 5RQCh. 4 - Prob. 6RQCh. 4 - Prob. 7RQCh. 4 - Prob. 8RQCh. 4 - Prob. 9RQCh. 4 - Prob. 10RQCh. 4 - Prob. 11RQCh. 4 - Prob. 12RQCh. 4 - Use the code shown in Figure 4-54 to answer Review...Ch. 4 - Use the code shown in Figure 4-54 to answer Review...Ch. 4 - Use the code shown in Figure 4-54 to answer Review...Ch. 4 - Prob. 16RQCh. 4 - Prob. 17RQCh. 4 - Prob. 18RQCh. 4 - Prob. 19RQCh. 4 - Prob. 20RQCh. 4 - Prob. 21RQCh. 4 - Prob. 22RQCh. 4 - Prob. 23RQCh. 4 - Prob. 24RQCh. 4 - Prob. 25RQCh. 4 - It is customary in Windows applications to...Ch. 4 - Prob. 27RQCh. 4 - Prob. 28RQCh. 4 - Prob. 29RQCh. 4 - Prob. 30RQCh. 4 - Prob. 31RQCh. 4 - Prob. 32RQCh. 4 - Prob. 33RQCh. 4 - Prob. 34RQCh. 4 - Which of the following statements is equivalent to...Ch. 4 - The six logical operators are listed below....Ch. 4 - An expression can contain arithmetic, comparison,...Ch. 4 - Prob. 1ECh. 4 - Prob. 2ECh. 4 - Prob. 3ECh. 4 - Prob. 7ECh. 4 - Prob. 11ECh. 4 - The purpose of this exercise is to demonstrate the...
Knowledge Booster
Similar questions
- Identify the run-on in the selection. If the selection contains no run-on, select "Correct." A) I saw many adorable kittens and puppies at the animal shelter. B) I am allergic to fur, I adopted a turtle instead. C) A turtle, however, is not very cuddly.arrow_forwardFlag question Let A = {1, 2, 3, 4, 5, 6, 7} Let B = {3, 4, 5, 6, 7, 8, 9} Let X = 13 Let X=X+|An B| Let X=X+|A U B| What is the mystery number X? Answer:arrow_forwardPython Turtle Graphics Draw a spiral diagram using Python turtle package program follows 3 steps: Import the turtle module Create a turtle to control. Draw around using the turtle methods. You should consider the following points in your solution: The shapes should be drawn with the shown colors Yellow and white for the square-like shapes. Blue for the background. The prompt should have a turtle shape. The number of iterations should be 300 You should use only one loop. The number of the yellow color lines should be 200. The final shape of the output should be as shown in the picture attached. Make sure to set properly the starting position (x & y) of your drawing, to maintain the required diagram. video on youtube: https://www.youtube.com/watch?v=ZqoJD2RMu1Iarrow_forward
- Functions for Organizing Your Code. You will create a new version of the program below . This new version will define the following functions. A function to read and validate the user option. A function to read and validate a yes/no input, if using the user-confirmation approach. A function that prints the menu A function that reads the order and returns the sub-total (which is the sum of the prices of the items ordered). A function that takes the sub-total as a parameter, and calculates and return the tax, the final total, and the tip. A function that takes the sub-tota, tax, total, and tip, and prints a receipt. Defiine function main() to drive the functionality of the program. Your program shall: Define and call the required functions Use meaningful names for the functions. Run and test the program to make sure it works correctly import sys menu = "Y"continueLoop ="y" #Enter number for each dish and price for users while continueLoop =="y":DishNumber= int(input("Enter…arrow_forwardConditional formatting has a functionality where it can use formulas for adding new rules. TRUE OR FALSEarrow_forwardMULTIPLE CHOICE -The answer is one of the options below please solve carefully and circle the correct option Please write clear .arrow_forward
- An argument is expressed in English below. Rhys will go to the beach. If Rhys is excited; then Rhys will go to the beach. Rhys is excited. Variable names are assigned to each English phrase as follows: p: Rhys is excited •q: Rhys will go to the beach Is the argument valid? If valid, then indicate which rule is used for the argument. If invalid, then give truth assignments to the variables that prove the argument is invalid. Pick 4. Check Nextarrow_forwardget_column_choice(): this function will allow us to ask the players which pocket they want to grab stones from. Since we know which row they are grabbing from (since it is not allowed to grab stones from your opponent’s side), we only need to get the column they want. As previously stated, we are using letters to represent the columns to make it easier on the player. This function accepts the current player (should be a 0 or 1), the board, and a list of letters (the same as the list you passed to the print_game_board function) and it will return the index of the column being chosen. The function should ask the player to enter a column letter, then it should check that the conditions listed below hold. If they don’t meet these conditions, it should ask again until it gets a valid letter, otherwise it should return the corresponding column index for that letter. Letter entered must be on the game board. It can be lower case or upper case. (Hint: this doesn’t need to be hard coded,…arrow_forwardInstructor note: Important Coding Guidelines: Use comments, and whitespaces around operators and assignments. Use line breaks and indent your code. Use naming conventions for variables, functions, methods, and more. This makes it easier to understand the code. Write simple code and do not over complicate the logic. Code exhibits simplicity when it’s well organized, logically minimal, and easily readable. A pedometer treats walking 1 step as walking 2.5 feet. Define a method named feetToSteps that takes a double as a parameter, representing the number of feet walked, and returns an integer that represents the number of steps walked. Then, write a main program that reads the number of feet walked as an input, calls method feetToSteps() with the input as an argument, and outputs the number of steps. Use floating-point arithmetic to perform the conversion. Ex: If the input is: 150.5 the output is: 60 The program must define and call a method:public static int feetToSteps(double…arrow_forward
- Lining up your curly braces when using decision structures not only makes it easier to read and catch matching curly braces but it will also make your code run more efficiently. True or false?arrow_forward# ===================== Provided Helper Functions ===================== def transform_string(s: str) -> str: """Return a new string based on s in which all letters have been converted to uppercase and punctuation characters have been stripped from both ends. Inner punctuation is left untouched. >>> transform_string('Birthday!!!') 'BIRTHDAY' >>> transform_string('"Quoted?"') 'QUOTED' >>> transform_string('To be? Or not to be?') 'TO BE? OR NOT TO BE' """ punctuation = """!"'`@$%^&_-+={}|\\/,;:.-?)([]<>*#\n\t\r""" result = s.upper().strip(punctuation) return result def is_vowel_phoneme(phoneme: str) -> bool: """Return True if and only if phoneme is a vowel phoneme. That is, whether phoneme ends in a 0, 1, or 2. Precondition: len(phoneme) > 0 and phoneme.isupper() >>> is_vowel_phoneme('AE0') True >>> is_vowel_phoneme('DH') False >>>…arrow_forwardDesign Assignment: Texas Hold 'em poker game 2 to 8 human or computer players Each player has a name and stack of chips Computer players have a difficulty setting: easy, medium, hard Summary of each hand: Dealer collects ante from appropriate players, shuffles the deck, and deals each player a hand of 2 cards from the deck. A betting round occurs, followed by dealing 3 shared cards from the deck. As shared cards are dealt, more betting rounds occur, where each player can fold, check, or raise. At the end of a round, if more than one player is remaining, players' hands are compared, and the best hand wins the pot of all chips bet so far. Create the Use Cases for this system Create a Use Case diagram for this systemarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage