What discount rate will be applied to the purchase_price in this code snippet?
The discounted price that will be applied is ,
Where purchase_price <100
discount_amount = purchase_price * .05
discount_amount = 92.5 * 0.05
discount_amount = 4.625
This happens because 92.5 is greater than 50 so if will not be executed. 92.5 is also greater than 75 so the first elif will also not get executed. But 92.5 is less than 100 so the second elif will be executed.
If you liked the solution then give a thumbs up ?
What discount rate will be applied to the purchase_price in this code snippet? purchase_price- 92.50 discount...
Which line, if any, from the given code snippet would produce a compilation error? StackADT<object> mainList = null; // Line 1 mainList = new ArrayStack<T>(); // Line 2 mainList.push((T[]) (new Object[5])); // Line 3
51. What is the output of the following code snippet? int number = 0; int ptr_num -&number ptr_num 60; number-80 cout < "ptr num << endl b, 60 c. 80 d. the address of number Answer 52. What is the output of the following code snippet? double num-0.0; double* ptr = # num = 15.0; ptr ptr 15.0 cout << num <<"ptr <<endl; a. 15 15 b. 15 30 С. 30 15 d. 30 30 Answer: 53. What is the...
What will be printed for the code below: age = 15 if (age < 13) { print ("child") } else if (age >= 13 & age <=19) { print ("teenager") } else { print ("adult") } What will be the output of the code below: for(i in 1:100) { if(i <= 20){ print (i) }
whats the output? 1 = 4 b = 10.0 C = 19.0 while i < 10: if b < c: print(b, '<', c) elif í > 8: print(b + c) 1 + 1 else: print(1) C = 1 C -= 2 b += 1 1 += 1
Question 25 What is output when the following code is executed? 65 score = group if score <= 60: group group + 'A' if score <= 70: group group + 'B' if score <= 80: group group + 'C' else: group group + 'D' print(group) BC AB с D
Consider the following C++code snippet and what is the output of this program? # include<iostream> using namespace std; void arraySome (int[), int, int); int main () const int arraysize = 10; int a[arraysize]-1,2,3,4,5, 6,7,8,9,10 cout << "The values in the array are:" << endl; arraySome (a, 0, arraySize) cout<< endl; system ("pause") return 0; void arraySome (int b[], int current, int size) if (current< size) arraySome (b, current+1, size); cout << b[current] <<""; a) Print the array values b) Double...
Question 17 With the logic block shown below, what is output when grade is assigned with the value 75? If grade < 50 Put "F" to output Else If grade < 60 Put "D" to output Else If grade < 75 Put "C" to output Else If grade < 85 Put "B" to output Else If grade Put "A" to output <= 100 Else Put "Invalid grade" to output Invalid grade A 00
You see the following code, but you don't see how the variable x was defined. if x%2 == or x < 0: print("A") elif X%3 =s and x > 10: print("B") if x < 1000: print("C") print("D") When the code is run, the output is B D What conclusions can you make about x? Select all that apply.
What is the value of n after the following snippet? int n = 13, m = 16; int* np = &n; np = &m; *np = 10; O 16 O 10 O A memory address O 13 True or False? This snippet correctly frees the memory it allocates. int** nums = new int*[10]; for (int i = 0; i < 10; i++) { nums[i] = new int; for (int i = 0; i < 10; i++) { delete nums[i]; delete...
State the quadrant in which lies. sin(8) <0, cos(8) < 0 OII III OIV 8 If sin() and 8 is in the 1st quadrant, find the exact value for cos(8). 9 cos(8) - > Next Question State the quadrant in which lies. tan(8) > 0, csc(8) < 0 01 OII O III OIV