Starting Out With Visual Basic (8th Edition)
8th Edition
ISBN: 9780135204658
Author: Tony Gaddis, Kip R. Irvine
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 4.7, Problem 4.9CP
Program Plan Intro
String comparison in Visual Basic:
- The relational operators are used to compare strings. The result of relational operations is always a Boolean value.
- The relational operators and their meanings are given below,
Symbol | Meaning |
< | Less than |
<= | Less than or equal to |
> | Greater than |
>= | Greater than or equal to |
== | Equal to |
<> | Not equal to |
Is | Compare references. |
- While comparing two strings, the corresponding letters are compared. And the result will be true if all the comparisons are true.
Explanation of Solution
2. “AAA”> “AA”
The Unicode of every letters are given below,
- The decimal value of “A” is 65. So when comparing “A” and “A”, “A” is equal to “A”...
Explanation of Solution
3. “ABC123”< “abc123”
The Unicode of every letters are given below,
- The decimal value of “A” is 65 and of “a” is 97. So when comparing “A” and “a”, “A” is smaller than “a”.
- The decimal value of “B” is 66 and of “b” is 98...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Which is a valid identifier?
A. Tuition - Fee
B. int
C. NxT1
D. printf
Keyboard shortcut key command to execute a program
A. Ctrl+F9
B. Alt C+Enter
C. Alt+F9
D. Alt R+Enter
Which of the following is a valid declaration to store student's age?
a. Float student-age;
B. Int student-age;
C. Int student_age;
D. Float age
If “Excel” is stored in cell A1 and 2 is stored in cell B1, then which of the following statements is correct?Statement 1: =A1+B1 will throw #VALUE! errorStatement 1: =SUM(A1:B1) will return the value 2
a. Both statements are incorrect
b. Both Statements 1 & 2 are correct
c. Statement 1 is correct, and statement 2 is incorrect
d. Statement 2 is correct, and Statement 1 is incorrect
Ask the user for the name?
Ask the user to input five test scores and calculate the total of the test scores and Average of the test Scores.
Using the following 10-point grading scale for the average tests score, display the grade and reward the gift certificate using the formula.
Average testscore
Grade
Gift Certificate formula
90 and above
A
120% of average testscore
80–89
B
60% of average testscore
70–79
C
20% of average testscore
60–69
D
0% of average testscore
Please display Name of the user, five test scores, total, Average test score, Grade and the Gift Certificate amount based on above user input and calculations.
programming language - Python
Chapter 4 Solutions
Starting Out With Visual Basic (8th Edition)
Ch. 4.2 - Prob. 4.1CPCh. 4.2 - In the following If Then statement, assume that...Ch. 4.2 - Do both of the following If Then statements...Ch. 4.2 - Prob. 4.4CPCh. 4.3 - Prob. 4.5CPCh. 4.4 - The following If Then ElseIf statement has...Ch. 4.4 - Prob. 4.7CPCh. 4.6 - Prob. 4.8CPCh. 4.7 - Prob. 4.9CPCh. 4.7 - Prob. 4.10CP
Ch. 4.8 - Convert the following If Then Elself statement...Ch. 4.10 - Prob. 4.12CPCh. 4.10 - Prob. 4.13CPCh. 4.10 - Write a Boolean expression that equals true when a...Ch. 4.10 - Prob. 4.15CPCh. 4.10 - Prob. 4.16CPCh. 4 - A (n) _______structure allows a program to execute...Ch. 4 - A (n) _______operator determines if a specific...Ch. 4 - Boolean expressions can only be evaluated as_____...Ch. 4 - A (n)_______is a Boolean variable that signals...Ch. 4 - Prob. 5FIBCh. 4 - Prob. 6FIBCh. 4 - A(n)________ If statement is an If statement that...Ch. 4 - _______operators connect two or more relational...Ch. 4 - Prob. 9FIBCh. 4 - Prob. 10FIBCh. 4 - Prob. 11FIBCh. 4 - Prob. 12FIBCh. 4 - Prob. 13FIBCh. 4 - Prob. 14FIBCh. 4 - Prob. 15FIBCh. 4 - Prob. 16FIBCh. 4 - Prob. 17FIBCh. 4 - Prob. 18FIBCh. 4 - ________ is the process of inspecting input values...Ch. 4 - Prob. 20FIBCh. 4 - Prob. 21FIBCh. 4 - Prob. 1TFCh. 4 - T F: It is not possible to write Boolean...Ch. 4 - Prob. 3TFCh. 4 - T F: Clicking on a radio button selects it and...Ch. 4 - T F: Radio buttons that are placed inside a group...Ch. 4 - Prob. 6TFCh. 4 - Prob. 7TFCh. 4 - Prob. 8TFCh. 4 - Prob. 9TFCh. 4 - Prob. 10TFCh. 4 - Prob. 1MCCh. 4 - This statement can cause other program statements...Ch. 4 - Prob. 3MCCh. 4 - This statement is like a chain of If statements....Ch. 4 - When placed at the end of an IfThenElself...Ch. 4 - When an If statement is placed inside another If...Ch. 4 - This operator connects two Boolean expressions...Ch. 4 - This operator connects two Boolean expressions...Ch. 4 - Prob. 9MCCh. 4 - This operator connects two Boolean expressions...Ch. 4 - When determining whether a number is inside a...Ch. 4 - When determining whether a number is outside a...Ch. 4 - Prob. 13MCCh. 4 - This method attempts to convert a value to...Ch. 4 - Prob. 15MCCh. 4 - Describe the difference between the If Then ...Ch. 4 - In an IfThenElseIf statement, what is the purpose...Ch. 4 - What is a flag and how does it work?Ch. 4 - Briefly describe how the And operator works.Ch. 4 - Briefly describe how the Or operator works.Ch. 4 - How is the Xor operator different from the Or...Ch. 4 - Prob. 7SACh. 4 - How is the OrElse operator different from the Or...Ch. 4 - Why are the relational operators called...Ch. 4 - Prob. 2WDTCh. 4 - Why does Visual Studio automatically indent them...Ch. 4 - Prob. 4WDTCh. 4 - Prob. 1FTECh. 4 - Prob. 1AWCh. 4 - Write an IfThen statement that assigns 0 to intX...Ch. 4 - Write an IfThen statement that multiplies...Ch. 4 - Prob. 4AWCh. 4 - Write an IfThen statement that sets the variable...Ch. 4 - Write an IfThenElse statement that assigns 1 to...Ch. 4 - The string variable strPeople contains a list of...Ch. 4 - Write an IfThen statement that prints the message...Ch. 4 - Write an IfThen statement that prints the message...Ch. 4 - Prob. 10AWCh. 4 - Prob. 1PCCh. 4 - Roman Numeral Converter The Roman Numeral...Ch. 4 - Fat Percentage Calculator Create an application...Ch. 4 - Weekly Temperatures with Validation Programming...Ch. 4 - Software Sales Software companies often offer...Ch. 4 - Sailboat Race Ranking Programming Challenge 7 in...Ch. 4 - Pay Per Click Advertising Revenue Many Web sites...Ch. 4 - Speed of Sound The following table shows the...Ch. 4 - Prob. 9PCCh. 4 - Name Formatting Create an application that lets...Ch. 4 - Prob. 11PCCh. 4 - Museum Tours Write a program that lets the user...Ch. 4 - Prob. 13PCCh. 4 - Mass and Weight Scientists measure an objects mass...Ch. 4 - Book Club Points Serendipity Booksellers has a...Ch. 4 - Body Mass Index Program Enhancement In Programming...Ch. 4 - Magic Dates The date June 10, 1960, is special...
Knowledge Booster
Similar questions
- Which of the following statements generates a random integer from 1 to 25 (including 25)? intNum = randGen.Next(1, 25) intNum = randGen.Next(1, 26) intNum = randGen(l, 25) intNum = randGen.NextNumber(1, 26)arrow_forwardSumif, Countif Functions Kindly following the instructions below and enter the appropriate formula in cell. Name Electronics SELLING PRICE Results Patricia King Laptop $ 6,665.00 Sum all Electronics that equals "Monitor" and enter in D8. Patricia King Monitor $ 5,000.00 Charles Monaghan Printer $ 7,300.00 Fred Jones Projector $ 6,500.00 In cell D11 count all electronics for Patricia King. John Paul Headset $ 5,248.00 Charlie Brown Laptop $ 6,000.00 Pink Panter Monitor $ 4,400.00 $ 4,400.00 ITEM CAR MODEL SELLING PRICE Results Retro Style Billet Grille Chevy $ 319.00 In cell D17 Sum all Car Models that equals "Dodge". Hood Vent Dodge $ 55.00 Rear Spoiler…arrow_forwardSumif, Countif Functions Kindly following the instructions below and enter the appropriate formula in cell. Name Electronics SELLING PRICE Results Patricia King Laptop $ 6,665.00 Sum all Electronics that equals "Monitor" and enter in D8. Patricia King Monitor $ 5,000.00 Charles Monaghan Printer $ 7,300.00 Fred Jones Projector $ 6,500.00 In cell D11 count all electronics for Patricia King. John Paul Headset $ 5,248.00 Charlie Brown Laptop $ 6,000.00 Pink Panter Monitor $ 4,400.00 $ 4,400.00 ITEM CAR MODEL SELLING PRICE Results Retro Style Billet Grille Chevy $ 319.00 In cell D17 Sum all Car Models that equals "Dodge". Hood Vent Dodge $ 55.00 Rear Spoiler Mustang $ 220.00…arrow_forward
- Which of the following are true with respect to the functionality provided by scanf and printf? Choose ONLY the correct options (one or more). Question 7 options: Although printf is not passed the pointer to an integer variable, it can still access the original integer variable's memory location to read its contents. None of the other options given are true. scanf needs to be passed the pointer to an integer variable because it needs to modify the original variable. scanf's functionality can also be implemented so that it can be given the original integer variable directly without having to pass its address.arrow_forwardWhich of the following Python statements assigns a variable to an increasing set of values with constant increment? a. import numpy as np b. dBdt = k1*Ca = k2*Cb c. t= np.linspace(0,5,100) d. C0 = [Ca0, Cb0, Cc0]arrow_forward3. Which among the following shows a valid use of the Direction enumeration as a parameter to the moveCharacter function? Select al that apply. enum Direction { case north, south, west, east}func moveCharacter(x: Int, y: Int, facing: Direction) {// code here} moveCharacter(x: 0, y: 0, facing: .southwest) moveCharacter(x: 0, y: 0, facing: Direction.north) moveCharacter(x: 0, y: 0, facing: .south) moveCharacter(x: 0, y: 0, facing: Direction.northeast)arrow_forward
- Which of the following statements is equivalent to the statement dblTotal = dblRate * dblTotal? a. dblTotal =* dblRate b. dblTotal *= dblRate c. dblRate *= dblTotal d. dblRate =* dblTotalarrow_forwardwhich of the following would be stored in an "integer" variable? a. false b.50 c."fifty" d.5.0arrow_forwardWhich of the following is a computer memory location whose value does not change during run time? a. literal b. named constant c. static constant d. variablearrow_forward
- Create an application that finds the greatest common divisor of two positive integers entered by the user. Console Greatest Common Divisor Finder Enter first number: 12 Enter second number: 8 Greatest common divisor: 4 Continue? (y/n): y Enter first number: 77 Enter second number: 33 Greatest common divisor: 11 Continue? (y/n): y Enter first number: 441 Enter second number: 252 Greatest common divisor: 63 Continue? (y/n): n Specifications The formula for finding the greatest common divisor of two positive integers x and y must follow the Euclidean algorithm as follows: Subtract x from y repeatedly until y < x. Swap the values of x and y. Repeat steps 1 and 2 until x = 0. y is the greatest common divisor of the two numbers. You can use one loop for step 1 of the algorithm nested within a second loop for step 3. Assume that the user will enter valid integers for both numbers. The application should continue only if the user enters 'y' or 'Y' to continue. Note that if you do…arrow_forwardWhich of the following statements declares the dblMAX_PAY named constant and initializes it to 11.25? a. Con dblMAX_PAY As Double = 11.25 b. Const dblMAX_PAY As Double = 11.25 c. Constant dblMAX_PAY As Double = 11.25d. none of the abovearrow_forwardWhich of the following statements places input into the variable "value"?a) value >> cin;b) cin >> value;c) value << cin;d) cin << value;arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning