Question
CSC 120 Lab 00 Circle or highlight or write your answers (+5)Suppose your cell phone carrier charges you a monthly fee of $30.00 for up
CSC 120 Lab 00
Circle or highlight or write your answers
(+5)Suppose your cell phone carrier charges you a monthly fee of $30.00 for up to 300 minutes and $0.45 for each additional minute after the first 300. Assuming you used your phone for x minutes with x > 300, the total monthly fee would be?
Hint: try to determine your fee if you used 350 minutes; replace x with 350 in your calculations
30 + x 300*.45
30 + (x -300) * .45
30 + (300 - x) * .45
none of the above
(+5) To determine the number of seconds in x years, which of the following calculations could you use (assume leap year(s) are not a factor)
X*365*24*60
X*365*24*60*60
X*365*24*60*60*60
None of these
(+5) Julie buys 10 CDs for $20. If DVDs cost $2 more, how many DVDs can she buy for the same 20 dollars? Hint: How much each CD cost?
3
4
5
6
(+5) Formula for the distance (d) is given by d = rate*time. For example if you are traveling at 60 mph for 3 hours the distance traveled is 180 (=60*3). Assuming Mary is traveling at 50 mph and Jim is traveling at 60 mph, how long does Jim have to travel in order that the distance between Mary and Jim is greater than or equal to 100 miles? NOTE: After one hour Jim is 10 miles ahead
Assume Mary and Jim leave at the same time, are traveling in the same direction on parallel tracks
11 hours
9 hours
10 hours
8 hours
(+5) Shirley wanted to calculate her GPA for the semester. The following algorithm can be used:
To calculate G.P.A. for one semester:
Step 1: Multiply the point value of the letter grade ( A = 4.00, B = 3.00 C= 2.0 D = 1.0 F = 0.00 ) by the number of credit hours for each course. The result is the quality points earned.
Step 2: Total the credit hours for the semester
Step 3: total the quality points for the semester.
Step 4: Divide the total quality points by the total credit hours.
Her grades and credit hours for the four courses she took are:
B 3 credit hours
A 3 credit hours
C 4 credit hours
F 3 credit hours
Which of the following is Shirleys GPA for the semester (rounded to two decimal points )?
2.23
1.90
1.76
2.15
(+5) Given the following algorithm:
if ( x is greater than 50) AND (y is less than 20) output Yes
else output No
Assuming x equals 60 and y equals 25 then the output would be:
Yes
No
(+5) 125% of a certain number equals 35. What is the number?
28
30
35
32
(+5) Aaron is staying at a hotel that charges $100 per night plus tax for a room. A tax of 8% is applied to the room rate per day and an additional one-time fee of $5.00 is charged by the hotel. Which of the following represents total charge, in dollars, for staying x nights
Hint: what would be the charge for one night stay? Two nights? NOTE: * means multiplication
(100 + .08*x) + 5
1.08(100*x) + 5
1.08(100*x + 5)
1.08(100 + 5)* x
(+5) Which of the following equations gives the relationship between S and T in the table below? (* means multiplication in the answers)
S | 1 | 2 | 3 | 4 | 5 | 6 |
T | 1 | 4 | 7 | 10 | 13 | 16 |
T = 2 S
T = 4 3*S
T = 3*S +1
T = 3*S -2
None of the above
(+5) On Saturday afternoon, Armand sent m text messages each hour for 5 hours, and Tyrone sent p text messages each hour for 4 hours. Which of the following represents the total number of messages sent by Armand and Tyrone on Saturday afternoon?
9*m*p
20*m*p
5*m + 4*p
4*m + 5*p
(+5) if 1 AA = 2 BB and 1 BB = 3 CC how many AAs are equal 36 CCs ? HINT: How many BBs are equal to 36 CCs
12
30
6
72
108
(+5)Given the following functions:
ceil(x) returns the smallest value as a decimal that is not less than x i.e. Round up
Examples: ceil(3.8) = 4.0 ceil(-2.3)= -2.0 ceil(2.3)= 3.0 ceil(-3.8) = -3.0
floor(x) returns the value of x rounded downward as a decimal
Examples: floor(3.8) = 3.0 floor(-2.3)= -3.0 floor(2.3)= 2.0 floor(-3.8) = -4.0
Given the following calculations
ceil(floor( 3.7) ) + floor( ceil( 3.7) ) (1)
ceil( ceil( 3.7 ) ) + floor( floor( 3.7) ) (2)
Which of the following statements about the above calculations is true?
(1) is greater than (2)
(2) is greater than (1)
(1) and (2) are equal
(+5) What is the total amount of your purchase if you bought 5 sweaters for $X and 2 additional sweaters at 50% off ?
$5X
$6X
$7.5X
$10X
(+15) Developing an optimal strategy for a variant of the game Nim. The three problems, +5 for each problem, that require answers appear at the end
Nim is a subtraction game that is played with sticks. The subtraction game variant is simple. A pile of sticks is placed in front of a pair of participants. The players take turns removing either 1, 2, 3, or 4 sticks from the pile. The player who removes that last stick from the pile loses the game. It turns out that there is an optimal strategy for playing this subtraction game variant of Nim. The purpose of this exercise is to find the strategy (solution.)
Rules of the game
We begin by considering the rules of the game. A player loses the game if he/she is forced to pick up the last stick in the pile. Thus, a pile containing a single stick is bad pile. Other piles of sticks are not so bad. Consider a pile that contains 2 sticks. If it is your turn and you have a pile with 2 sticks then you can pick up a single stick which will leave your opponent with a bad pile containing a single stick. Likewise, if it is your turn and you have a pile with 3 sticks then you can pick up 2 sticks which will leave your opponent with a bad pile containing a single stick. And if it is your turn and you have a pile with 4 sticks then you can pick up 3 sticks which will leave your opponent with a bad pile containing a single stick. Finally, if it is your turn and you have a pile with 5 sticks then you can pick up 4 sticks which will leave your opponent with a bad pile containing a single stick.
Number of sticks Your turn Outcome
1 no strategy you lose (bad pile)
2 remove 1 stick you win
3 remove 2 sticks you win
4 remove 3 sticks you win
5 remove 4 sticks you win
6 no strategy you lose (bad pile)
7 remove 1 you win
11 no strategy you lose
Why it is a bad pile for you with 6 sticks
Note that if it is your turn and you a have a pile with 6 sticks then there is nothing you can do to prevent your opponent from giving you a bad pile after his/her turn. If you take a single stick then he/she can take 4 sticks, leaving you with a bad pile. If, on the other hand, you take 2 sticks then he/she can take 3 sticks, leaving you with a bad pile. If your take 3 sticks then he/she can take 2 sticks, leaving you with a bad pile. Finally, if you take 4 sticks then he/she can take a single stick, leaving you with a bad pile. So, a pile with 6 sticks is just as bad as a pile with a single stick.
Why it is a good pile for you with 7, 8, 9, 10 sticks
A pile with 7 sticks, on the other hand, is great because you can take a single stick and force your opponent to have to deal with a bad pile containing 6 sticks. Likewise, you can force your opponent to have to deal with a bad pile containing 6 sticks if you have a pile with 8, 9, or 10 sticks by removing 2, 3, or 4 sticks, respectively. A pattern is clearly arising.
Why it is a bad pile for you with 11 sticks
Note that if it is your turn and you a have a pile with 11 sticks then there is nothing you can do to prevent your opponent from giving you a bad pile after his/her turn. If you take a single stick then he/she can take 4 sticks, leaving you with a bad pile (6 sticks). If, on the other hand, you take 2 sticks then he/she can take 3 sticks, leaving you with a bad pile(6 sticks). If your take 3 sticks then he/she can take 2 sticks, leaving you with a bad pile (6 sticks).. Finally, if you take 4 sticks then he/she can take a single stick, leaving you with a bad pile(6 sticks).. So, a pile with 11 sticks is just as bad as a pile with a 6 sticks.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started