SlideShare a Scribd company logo
1 of 2
Quiz 9 review sheet.
1. Val()function is used to convert an entry in an input box to a number
2. A set of statements that perform a task over and over again based on a condition is called a
loop.
3. A Do…Loop begins after the Boolean condition loops at least once. If the condition is true, the
loop repeats.
4. Repeating a set of statements is called iteration.
5. Accumulators are useful to keep running totals.
6. Do While quantity < 50
numShipments += 1
inStock += quantityReceived
Loop

Which variable is the accumulator? Quantity
7. Given the following statements:
Dim x As Integer = 0
Do
x = x + 2
Loop While x < 10

The Do Loop will execute 5 times. If x = 0, x + 2 = 2, loop, x + 2 = 4, loop, x + 2 = 6, loop, x + 2 =
8, loop, x + 2 = 10. Looping stops because x reaches 10. How many times did it loop? 5
including the first x + 2 = 2.

8. Given the following statements:
For x As Integer = 1 To 11
MessageBox.Show(x)
Next x

How many message boxes will be displayed? 12
9. The following statements would create an infinite loop.
Dim x As Integer = -2
Do While x < 0
x = x + 1
Loop

The answer is False.
10. Convert()is used to convert an entry in an input box to a number.
11. A flag is a condition that is used to run a program.

12. Given the following code segment:
Dim a As Integer = 0
Dim b As Integer = 0
Do While a < 10
b += a
Loop
Me.lblMessage.Text = b

Which output will be displayed? 0

More Related Content

Viewers also liked

грамота ученики блог_об_италии
грамота ученики блог_об_италииграмота ученики блог_об_италии
грамота ученики блог_об_италииMasha Bo
 
Slide 1 of Hitler Youth
Slide 1 of Hitler YouthSlide 1 of Hitler Youth
Slide 1 of Hitler YouthSebastian1239
 
Outdated Browser Detected - Comment se débarrasser De ce
Outdated Browser Detected - Comment se débarrasser De ceOutdated Browser Detected - Comment se débarrasser De ce
Outdated Browser Detected - Comment se débarrasser De ceVictoria-01
 
19 2- khoa lop 5 dung dich
19 2- khoa lop 5  dung dich19 2- khoa lop 5  dung dich
19 2- khoa lop 5 dung dichtieuhocvn .info
 
Adding Value to HBase with IBM InfoSphere BigInsights and BigSQL
Adding Value to HBase with IBM InfoSphere BigInsights and BigSQLAdding Value to HBase with IBM InfoSphere BigInsights and BigSQL
Adding Value to HBase with IBM InfoSphere BigInsights and BigSQLPiotr Pruski
 
3. introduction to software testing
3. introduction to software testing3. introduction to software testing
3. introduction to software testingChandra Maddigapu
 
Halong Paradise Suites - The Very First Luxury Boutique Hotel in Halong
Halong Paradise Suites - The Very First Luxury Boutique Hotel in HalongHalong Paradise Suites - The Very First Luxury Boutique Hotel in Halong
Halong Paradise Suites - The Very First Luxury Boutique Hotel in HalongLong Nguyen
 

Viewers also liked (13)

Computer comunication
Computer comunicationComputer comunication
Computer comunication
 
Cristian presentacion
Cristian presentacionCristian presentacion
Cristian presentacion
 
Internet
InternetInternet
Internet
 
DB2 Application programming and sql guide
DB2 Application programming and sql guideDB2 Application programming and sql guide
DB2 Application programming and sql guide
 
грамота ученики блог_об_италии
грамота ученики блог_об_италииграмота ученики блог_об_италии
грамота ученики блог_об_италии
 
Slide 1 of Hitler Youth
Slide 1 of Hitler YouthSlide 1 of Hitler Youth
Slide 1 of Hitler Youth
 
Outdated Browser Detected - Comment se débarrasser De ce
Outdated Browser Detected - Comment se débarrasser De ceOutdated Browser Detected - Comment se débarrasser De ce
Outdated Browser Detected - Comment se débarrasser De ce
 
19 2- khoa lop 5 dung dich
19 2- khoa lop 5  dung dich19 2- khoa lop 5  dung dich
19 2- khoa lop 5 dung dich
 
Adding Value to HBase with IBM InfoSphere BigInsights and BigSQL
Adding Value to HBase with IBM InfoSphere BigInsights and BigSQLAdding Value to HBase with IBM InfoSphere BigInsights and BigSQL
Adding Value to HBase with IBM InfoSphere BigInsights and BigSQL
 
3. introduction to software testing
3. introduction to software testing3. introduction to software testing
3. introduction to software testing
 
Toothberg
ToothbergToothberg
Toothberg
 
Halong Paradise Suites - The Very First Luxury Boutique Hotel in Halong
Halong Paradise Suites - The Very First Luxury Boutique Hotel in HalongHalong Paradise Suites - The Very First Luxury Boutique Hotel in Halong
Halong Paradise Suites - The Very First Luxury Boutique Hotel in Halong
 
Test cases
Test casesTest cases
Test cases
 

Similar to Quiz 9 review sheet

Notes2
Notes2Notes2
Notes2hccit
 
Java loops for, while and do...while
Java loops   for, while and do...whileJava loops   for, while and do...while
Java loops for, while and do...whileJayfee Ramos
 
Lec7 - Loops updated.pptx
Lec7 - Loops updated.pptxLec7 - Loops updated.pptx
Lec7 - Loops updated.pptxNaumanRasheed11
 
C++ control structure
C++ control structureC++ control structure
C++ control structurebluejayjunior
 
Iterative control structures, looping, types of loops, loop working
Iterative control structures, looping, types of loops, loop workingIterative control structures, looping, types of loops, loop working
Iterative control structures, looping, types of loops, loop workingNeeru Mittal
 
Control structures ii
Control structures ii Control structures ii
Control structures ii Ahmad Idrees
 
Data structure notes
Data structure notesData structure notes
Data structure notesanujab5
 
Loop structures chpt_6
Loop structures chpt_6Loop structures chpt_6
Loop structures chpt_6cmontanez
 
Algorithm-RepetitionSentinellNestedLoop_Solution.pptx
Algorithm-RepetitionSentinellNestedLoop_Solution.pptxAlgorithm-RepetitionSentinellNestedLoop_Solution.pptx
Algorithm-RepetitionSentinellNestedLoop_Solution.pptxAliaaAqilah3
 
CONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VBCONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VBclassall
 
Ruby basics ||
Ruby basics ||Ruby basics ||
Ruby basics ||datt30
 
Chapter 2 : Programming with Java Statements
Chapter 2 : Programming with Java StatementsChapter 2 : Programming with Java Statements
Chapter 2 : Programming with Java StatementsIt Academy
 

Similar to Quiz 9 review sheet (20)

Notes2
Notes2Notes2
Notes2
 
Java loops for, while and do...while
Java loops   for, while and do...whileJava loops   for, while and do...while
Java loops for, while and do...while
 
Lec7 - Loops updated.pptx
Lec7 - Loops updated.pptxLec7 - Loops updated.pptx
Lec7 - Loops updated.pptx
 
C++ control structure
C++ control structureC++ control structure
C++ control structure
 
Do...Loop
Do...LoopDo...Loop
Do...Loop
 
C# Loops
C# LoopsC# Loops
C# Loops
 
Iterative control structures, looping, types of loops, loop working
Iterative control structures, looping, types of loops, loop workingIterative control structures, looping, types of loops, loop working
Iterative control structures, looping, types of loops, loop working
 
Vbscript
VbscriptVbscript
Vbscript
 
Loops and iteration.docx
Loops and iteration.docxLoops and iteration.docx
Loops and iteration.docx
 
Control structures ii
Control structures ii Control structures ii
Control structures ii
 
Greedy method by Dr. B. J. Mohite
Greedy method by Dr. B. J. MohiteGreedy method by Dr. B. J. Mohite
Greedy method by Dr. B. J. Mohite
 
L06
L06L06
L06
 
15-Loops.ppt
15-Loops.ppt15-Loops.ppt
15-Loops.ppt
 
Data structure notes
Data structure notesData structure notes
Data structure notes
 
Loop structures chpt_6
Loop structures chpt_6Loop structures chpt_6
Loop structures chpt_6
 
Algorithm-RepetitionSentinellNestedLoop_Solution.pptx
Algorithm-RepetitionSentinellNestedLoop_Solution.pptxAlgorithm-RepetitionSentinellNestedLoop_Solution.pptx
Algorithm-RepetitionSentinellNestedLoop_Solution.pptx
 
CONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VBCONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VB
 
Ruby basics ||
Ruby basics ||Ruby basics ||
Ruby basics ||
 
Control structures
Control structuresControl structures
Control structures
 
Chapter 2 : Programming with Java Statements
Chapter 2 : Programming with Java StatementsChapter 2 : Programming with Java Statements
Chapter 2 : Programming with Java Statements
 

Recently uploaded

Udaipur Call Girls 9602870969 Call Girl in Udaipur Rajasthan
Udaipur Call Girls 9602870969 Call Girl in Udaipur RajasthanUdaipur Call Girls 9602870969 Call Girl in Udaipur Rajasthan
Udaipur Call Girls 9602870969 Call Girl in Udaipur RajasthanApsara Of India
 
Pallawi ❣ 💓 Pallawi 09167673311 💓Call Girl in Thane Near Hiranandani Estate ...
Pallawi ❣ 💓 Pallawi  09167673311 💓Call Girl in Thane Near Hiranandani Estate ...Pallawi ❣ 💓 Pallawi  09167673311 💓Call Girl in Thane Near Hiranandani Estate ...
Pallawi ❣ 💓 Pallawi 09167673311 💓Call Girl in Thane Near Hiranandani Estate ...Pooja Nehwal
 
1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdfTanjirokamado769606
 
Call Girls in Nashik Bhavna 7001305949 Independent Escort Service Nashik
Call Girls in Nashik Bhavna 7001305949 Independent Escort Service NashikCall Girls in Nashik Bhavna 7001305949 Independent Escort Service Nashik
Call Girls in Nashik Bhavna 7001305949 Independent Escort Service Nashikranjana rawat
 
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...Amil Baba Company
 
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEGV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEApsara Of India
 
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcEViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcEApsara Of India
 
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...srsj9000
 
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7Riya Pathan
 
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7Riya Pathan
 
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...anamikaraghav4
 
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaVIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaRiya Pathan
 
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...anamikaraghav4
 
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...anamikaraghav4
 
Fun Call Girls In Goa 7028418221 Escort Service In Morjim Beach Call Girl
Fun Call Girls In Goa 7028418221 Escort Service In Morjim Beach Call GirlFun Call Girls In Goa 7028418221 Escort Service In Morjim Beach Call Girl
Fun Call Girls In Goa 7028418221 Escort Service In Morjim Beach Call GirlApsara Of India
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607dollysharma2066
 
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...First NO1 World Amil baba in Faisalabad
 
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment BookingAir-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment BookingRiya Pathan
 
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7Riya Pathan
 
Call Girls Nikol 7397865700 Ridhima Hire Me Full Night
Call Girls Nikol 7397865700 Ridhima Hire Me Full NightCall Girls Nikol 7397865700 Ridhima Hire Me Full Night
Call Girls Nikol 7397865700 Ridhima Hire Me Full Nightssuser7cb4ff
 

Recently uploaded (20)

Udaipur Call Girls 9602870969 Call Girl in Udaipur Rajasthan
Udaipur Call Girls 9602870969 Call Girl in Udaipur RajasthanUdaipur Call Girls 9602870969 Call Girl in Udaipur Rajasthan
Udaipur Call Girls 9602870969 Call Girl in Udaipur Rajasthan
 
Pallawi ❣ 💓 Pallawi 09167673311 💓Call Girl in Thane Near Hiranandani Estate ...
Pallawi ❣ 💓 Pallawi  09167673311 💓Call Girl in Thane Near Hiranandani Estate ...Pallawi ❣ 💓 Pallawi  09167673311 💓Call Girl in Thane Near Hiranandani Estate ...
Pallawi ❣ 💓 Pallawi 09167673311 💓Call Girl in Thane Near Hiranandani Estate ...
 
1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf
 
Call Girls in Nashik Bhavna 7001305949 Independent Escort Service Nashik
Call Girls in Nashik Bhavna 7001305949 Independent Escort Service NashikCall Girls in Nashik Bhavna 7001305949 Independent Escort Service Nashik
Call Girls in Nashik Bhavna 7001305949 Independent Escort Service Nashik
 
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
 
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEGV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
 
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcEViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
 
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...
 
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7
 
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
 
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
 
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaVIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
 
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
 
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...
 
Fun Call Girls In Goa 7028418221 Escort Service In Morjim Beach Call Girl
Fun Call Girls In Goa 7028418221 Escort Service In Morjim Beach Call GirlFun Call Girls In Goa 7028418221 Escort Service In Morjim Beach Call Girl
Fun Call Girls In Goa 7028418221 Escort Service In Morjim Beach Call Girl
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
 
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
 
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment BookingAir-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
 
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7
 
Call Girls Nikol 7397865700 Ridhima Hire Me Full Night
Call Girls Nikol 7397865700 Ridhima Hire Me Full NightCall Girls Nikol 7397865700 Ridhima Hire Me Full Night
Call Girls Nikol 7397865700 Ridhima Hire Me Full Night
 

Quiz 9 review sheet

  • 1. Quiz 9 review sheet. 1. Val()function is used to convert an entry in an input box to a number 2. A set of statements that perform a task over and over again based on a condition is called a loop. 3. A Do…Loop begins after the Boolean condition loops at least once. If the condition is true, the loop repeats. 4. Repeating a set of statements is called iteration. 5. Accumulators are useful to keep running totals. 6. Do While quantity < 50 numShipments += 1 inStock += quantityReceived Loop Which variable is the accumulator? Quantity 7. Given the following statements: Dim x As Integer = 0 Do x = x + 2 Loop While x < 10 The Do Loop will execute 5 times. If x = 0, x + 2 = 2, loop, x + 2 = 4, loop, x + 2 = 6, loop, x + 2 = 8, loop, x + 2 = 10. Looping stops because x reaches 10. How many times did it loop? 5 including the first x + 2 = 2. 8. Given the following statements: For x As Integer = 1 To 11 MessageBox.Show(x) Next x How many message boxes will be displayed? 12 9. The following statements would create an infinite loop. Dim x As Integer = -2 Do While x < 0 x = x + 1 Loop The answer is False. 10. Convert()is used to convert an entry in an input box to a number. 11. A flag is a condition that is used to run a program. 12. Given the following code segment:
  • 2. Dim a As Integer = 0 Dim b As Integer = 0 Do While a < 10 b += a Loop Me.lblMessage.Text = b Which output will be displayed? 0