Mark 6 is a lottery game that draws unique balls out of a pool of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Mark 6 is a lottery game that draws ó unique balls out of a pool of 49 balls. The balls are numbered from 1 to 49. Some VBA code has been vwritten to mimic the Mark 6 lottery game by drawing 6 unique numbers from 1 to 49 into cells A1 to A6. Here is the code: Sub Mark6() Dim Number As Integer, Total As Integer Dim Test As Integer, TestResult As Boolean Range ("Al:A6").Clear Total = 1 Do while Total < 6 Number = Int(Rnd()49) + 1 TestResult = Blank 1 If Total >1 Then For Test = 1 To Total - 1 If Number = Cells(Test, 1).Value Then TestResult = Blank 2 End If Next Test End If If Not TestResult Then Cells(Total, 1).Value = Number Total = Total + 1 End If Loop End Sub What is the code you need to put in each blank above so that the code can draw 6 unique numbers out of 1 to 49 and put them in cells A1 to A6? You need to write the answers clearly in the boxes below. Do not write any spaces in the answers. For example, if you need to write an expression such as A+ B. you will write A+B without any spaces in between. Blank 1 is Blank 2 is Mark 6 is a lottery game that draws ó unique balls out of a pool of 49 balls. The balls are numbered from 1 to 49. Some VBA code has been vwritten to mimic the Mark 6 lottery game by drawing 6 unique numbers from 1 to 49 into cells A1 to A6. Here is the code: Sub Mark6() Dim Number As Integer, Total As Integer Dim Test As Integer, TestResult As Boolean Range ("Al:A6").Clear Total = 1 Do while Total < 6 Number = Int(Rnd()49) + 1 TestResult = Blank 1 If Total >1 Then For Test = 1 To Total - 1 If Number = Cells(Test, 1).Value Then TestResult = Blank 2 End If Next Test End If If Not TestResult Then Cells(Total, 1).Value = Number Total = Total + 1 End If Loop End Sub What is the code you need to put in each blank above so that the code can draw 6 unique numbers out of 1 to 49 and put them in cells A1 to A6? You need to write the answers clearly in the boxes below. Do not write any spaces in the answers. For example, if you need to write an expression such as A+ B. you will write A+B without any spaces in between. Blank 1 is Blank 2 is
Expert Answer:
Answer rating: 100% (QA)
Short Answer Blank1 False Blank2 True Detailed Answer While reading the explanation it is recommended that the student should keep the code nearby for their reference purpose VBA code in the question ... View the full answer
Related Book For
Elementary Statistics Picturing the World
ISBN: 978-0321911216
6th edition
Authors: Ron Larson, Betsy Farber
Posted Date:
Students also viewed these programming questions
-
Megabucks is a lottery game played in Massachusetts with the following rules. A random drawing of 6 numbers out of all 36 numbers from 1 to 36 is made every Wednesday and every Saturday. The game...
-
a. Research a lottery game that is offered in your state (or a state of your choice) and provides a count of the number of different tickets that could be purchased. That is, if a person wanted to...
-
A lottery exists where balls numbered 1 to 25 are placed in an urn. To win, you must match the four balls chosen in the correct order. How many possible outcomes are there for this game?
-
For the circuit in Fig. 8.115, use PSpice to obtain v(t) for 0 6 2 H 24 V 3 04Fv
-
Over what intervals (on the nonnegative side of the number line) is the error function increasing? Concave up?
-
Augustin Louis Cauchy (17891857) determined an empirical equation for n(λ) for substances that are transparent in the visible. His expression corresponded to the power series relation...
-
SWIGART v. BRUNO CALIFORNIA COURT OF APPEALS 13 CAL. APP. 5TH 529 2017 According to the American Endurance Ride Conference, endurance riding is a highly competitive and demanding sport. It is...
-
Oxford Concrete Inc. (OCI) processes and distributes various types of cement. The company buys quarried local rock, limestone, and clay from around the world and mixes, blends, and packages the...
-
1. Satisfaction A recent Gallup Poll asked a random 206 sample of 1025 adults, "In general, are you satisfied or dissatisfied with the way things are going in the United States at this time?" In all,...
-
C# and UML There is a computational system COMP. The names of its computational modules are stored in file modules.txt. New ones can be appended to the end of the file. The system displays the module...
-
Generally, the more ownership a company has, the greater its control over decisions. However, governments often protect minority owners so that majority owners do not act against their interests,...
-
What cognitive processes underlie the formulation and articulation of visionary statements, and how do visionary leaders effectively communicate their aspirations to inspire collective action and...
-
Discuss the operating systems roles Compare the following: Batch system, timesharing system, multiprogramming system, Distributed system and network system.
-
Even though most corporate bonds in the United States make coupon payments semiannually, bonds issued elsewhere often have annual coupon payments. Suppose a German company issues a bond with a par...
-
Carver Company issued an invoice dated July 1 for $5,000 to its customer with payment terms of 1/15, n/30. If the customer chooses to pay the invoice on July 18, the customer will pay Carver Company...
-
In the current year the Bridgeport Trust had DNI of $200,000, $50,000 of which was tax-exempt interest, and $150,000 was long-term capital gain. As the sole income beneficiary Billy McDugle received...
-
Explain why you were able to achieve or not achieve your goals what were the causes of your better or weaker-than-expected performance in the Bike stimulation?
-
A liquid flows upward through a valve situated in a vertical pipe. Calculate the differential pressure (kPa) between points A and B. The mean velocity of the flow is 4.1 m/s. The specific gravity of...
-
The ages of the residents of Medicine Lake, Montana, in 2010 Age Frequency 0 9 30 10 19 28 20 29 17 30 39 22 40 49 23 50 59 46 60 69 37 70 79 18 80 89 4 Approximate the mean of the...
-
The well-being index is a way to measure how people are faring physically, emotionally, socially, and professionally, as well as to rate the overall quality of their lives and their outlooks for the...
-
The pie chart shows the distribution of how much married U.S. male adults trust their spouses to manage their finances. A financial services company claims that the distribution of how much married...
-
Based on Exhibit 1 and Blancas plans to borrow against its fi nancial receivables, the consolidated balance sheet will show total assets of: A. $50,000,000. B. $140,000,000. C. $150,000,000.
-
Topmakers infl uence on Rainers business activities can be best described as: A. signifi cant. B. controlling. C. shared control.
-
Th e carrying value reported on the balance sheet of Topmakers investment in Blancas debt securities at December 31, 2018 is: A. $10,940,000. B. $11,000,000. C. $12,000,000.
Study smarter with the SolutionInn App