Starting Out With Visual Basic (7th Edition)
7th Edition
ISBN: 9780134400150
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
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…
Please use C# for this. Thank you soo much!
assign(self, assignment:Assignment) -> AssignmentResult:
"""
This function is to simulate the process of the student receiving an assignment, then working on the
assignment, then submitting the assignment and finally receiving grade for the assignment. This function will
receive an assignment then a grade should be calculated using the following formula:
grade = 1 - (Student's current energy X Assignment difficulty level). The min grade a student may receive is 0% (0)
After the grade is calculated the student's energy should be decreased by percentage difficulty.
Example if the student has 80% (.8) energy and the assignment is a difficultly level .2 there final energy
should be 64% (.64) = .8 - (.8 * .2). The min energy a student may have is 0% (0)
Finally the grade calculated should be stored internally with in this class so it can be retrieved later.
Then an Assignment Result object should be created with the student's ID, the assignment…
Chapter 4 Solutions
Starting Out With Visual Basic (7th 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
- ( J • J ) ⊃ S The statement (J • J) ⊃ S has ______ unique statement letter(s). Therefore, its truth table must have _____ row(s).arrow_forwardA colon is Through Arguments , Commas and space is Individual Arguments True O False Oarrow_forwardYour Name - Week 3 PA Calculations & Unique Numbers Please enter an integer value: 100 Please enter an integer value: 23 Please enter an integer value: 123 Please enter an integer value: 123 Please enter an integer value: 456 Please enter an integer value: 546 Please enter an integer value: 456 Please enter an integer value: 100 Please enter an integer value: 32 Please enter an integer value: 23 The count of integers entered is: 10 The sum of integers entered is: 1982 The average of integers entered is: 198 The count of unique integers entered is: 6 The sum of unique integers entered is: 1280 The average of unique integers entered is: 213arrow_forward
- CODE : def days_in_feb(user_year): is_leap_year = 29 not_leap_year = 28 if user_year % 4 ==0: return is_leap_year elif user_year % 4 ==0 and user_year % 100 == 0 and user_year % 400 == 0: return is_leap_year else: return(not_leap_year) if __name__ == '__main__': # Type your code here. Your code must call the function. user_year = int(input()) days = days_in_feb(user_year) print(user_year,'has', days, 'days in February.') ERROR OUTPUT IS NOT WORKING FOR YEAR 1900 Input 1712 Your output 1712 has 29 days in February. Your output days_in_feb(1913) correctly returned 28 days_in_feb(1600) Your output days_in_feb(1600) correctly returned 29 4: Unit testkeyboard_arrow_up 0 / 3 days_in_feb(1900) Your output days_in_feb(1900) incorrectly returned 29arrow_forward8. A semaphore is a shared integer variable __________ i) that can not drop below zero ii) that can not be more than zero iii) that can not drop below one iv) that can not be more than onearrow_forwardIn python, To get in complete access to a global variable named student_data use... A. global student_data # in the function where you want access B. global student_data # in the main program C. global (student_data) # in the function where you want access D. global:student_data # in the function where you want accessarrow_forward
- display_b bout BOOK Haven". The function should output the following details: Welcome message and store location List of available book genres (Fiction, Mystery, Science Fiction, Fantasy, Non-Fiction) Current promotion ("Buy 2, Get 1 Free on all paperback books!") Customer service information ("For any inquiries, reach out to our customer service at 1-800-987-6543.") Store hours for each day of the week Contact information with a dedicated support email (info@bookhaven.com) Call the function to display the information.arrow_forwardThe following statements represent a "normal flow" use case to perform an online library search for a book. The steps are out of order. You are to number them in the natural order of beginning to end. Question 35 options: student selects option to close the session. student enters the information. system authenticates the student. system displays the options that are currently available on the machine. system displays a message to the student that the book is available. system searches database to find the status of the book. system prompts student to perform another action or to close session. system reads the digital library card information from the card. student inserts their digital library card into the library card reader. student selects option to place the book on hold for pick-up. student selects option to look up a book.…arrow_forwardYou need to use a function FirstName, the signature of which is given below: private string FirstName(string fullname)arrow_forward
- Fill in the blanks with logical or relational operators to make all the expressions return true (each blank has to be filled with exactly one operator). 1. (0 __ 1) 2. __ false __ ( __ false) 3. (2 __ 2) __ ((4 __ 3) __ (-1 __ -1)) 4. (false __ true) __ (1 __ 0) 5. true __ falsearrow_forwardHi! I get all these error messages with this code. Can you help me?arrow_forwardWarning ⚠️ Don't post AI generated answer or plagiarised answer. If I see these things I'll give you multiple downvotes and will report immediately.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 - CONSIGNMENTLINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.Computer ScienceISBN:9781337569798Author:ECKERTPublisher:CENGAGE L
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
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
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:9781337569798
Author:ECKERT
Publisher:CENGAGE L
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr