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 5, Problem 5RQ
Program Description Answer
When processing the given code, the string literal “Hi” will appear one time in the lblMsg control.
Hence, the correct answer is option “B”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
• Use a while loop
• Use multiple loop controlling conditions
• Use a boolean method
• Use the increment operator
• Extra credit: Reuse earlier code and call two methods from main
Details:
This assignment will be completed using the Eclipse IDE. Cut and paste your code from Eclipse into the Assignment text window.
This is another password program. In this case, your code is simply going to ask for a username and password, and then check the input against four users. The program will give the user three tries to input the correct username-password combination.
There will be four acceptable user-password combinations:
• alpha-alpha1
• beta-beta1
• gamma-gamma1
• delta - delta1
If the user types in one of the correct username-password combinations, then the program will output: "Login successful." Here are a couple of example runs (but your code needs to work for all four user-password combinations):
Username: beta
Type your current password: beta1
Login successful.
Username: delta
Type…
Using Visual Studio, C#
Need to use a for loop
The for loop is this type of loop.1. pretest2. posttest3. prefix4. postfix
Chapter 5 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 5 - Rewrite the Loop clause from Question 1 using the...Ch. 5 - Prob. 2MQ3Ch. 5 - Write a For clause that repeats the loop body...Ch. 5 - Write an Add method that adds the contents of the...Ch. 5 - Prob. 2MQ6Ch. 5 - Which of the following clauses will stop the loop...Ch. 5 - Which of the following statements can be used to...Ch. 5 - Prob. 3RQCh. 5 - Prob. 4RQCh. 5 - Prob. 5RQ
Knowledge Booster
Similar questions
- c++ The Seri Kuala Lumpur School auditorium contains 20 rows (numbered 1 through 20) with 30 seats each (numbered 1 through 30). Write an application that allows a user to continuously enter a row and seat request until a sentinel value is entered. If the row or seat number is out of range, issue an error message. Otherwise, determine whether the seat has already been reserved. If so, display an error message. If not, then charge the user $7.50 for a ticket and display a running total of the user’s purchase. When the user enters a sentinel, display the number of seats taken and the number of seats available in the auditorium.arrow_forwardIn the switch statement, we can use int type only for the control variables that are being tested in the loop condition. True Falsearrow_forwardTrue or False: You should be incrementing the control variable of a for loop True or False: you can use the control variable of a while loop after the loop has finished executing True or False: you can nest repetition structures in repetition structures True or False: you can nest selection structure in selection structuresarrow_forward
- Which kind of while loop may be broken by entering a letter or number into the input field? The loop's eof, counter, and flag may all be managed with the help of the loop sentinel.arrow_forwardInput Format Your application reads a line from the preferred Input (Console). Constraints String size must now not exceed one hundred characters. Output Format The application shows the identical line on Standard Output (Console)arrow_forwardThe following loop displays _____. for (int i = 1; i <= 10; i+=2) { System.out.print(i + " "); i++; } a)1 2 3 4 5 6 7 8 9 b)1 2 3 4 5 6 7 8 9 10 c)1 3 5 7 9 d)3 5 7 9 11arrow_forward
- True or False? In a do…while loop, the condition is checked at the bottom of the loop.arrow_forwardWhich kind of while loop may be broken by entering a single character or a single value into the input field? Although the loop eof, loop counter, and loop flag may all be managed, the loop sentinel cannot.arrow_forwardHow many times the following loop is executedarrow_forward
- Program file: ccurve. py Author: Ken This program prompts the user for the level of a c-curve and draws a c-curve of that level. IL II|| from turtle import Turtle def cCurve(t, x1, y1, x2, y2, level): def drawLine(x1, у1, х2, у2): """Draws a line segment between the endpoints. t.up() t.goto(x1, y1) t.down () t.goto(x2, y2) IL II|| if level == 0: drawLine(x1, у1, х2, у2) else: y2) // 2 х1) // 2 СCurve(t, x1, у1, хт, уm, level хm, ут, х2, у2, level xm = (x1 + x2 + y1 (x2 + y1 + у2 ym = 1) 1) cCurve( def main(): level = int(input("Enter the level (0 or greater): ")) Turtle() t.hideturtle() cCurve(t, 50, -50, 50, 50, level) t = main()arrow_forwardQUESTION 8 Check the following do while loop segment. Which statement shows has the correct description? int a=1; do { printf ("I love C"); a+=2; }while (a<0); It does not loop at all due to false condition. It contains syntax error. O The loop executes once and expired There is no update statement to update control variable value. QUESTION 9 ofuarinhle y and y after executing the following statements?arrow_forwardDraw flowchart:1.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT