[solved] – Question 91907

My first
project is to help them design an application using Python that will help shoppers determine which
products to buy at the supermarket and price after a percentage discount is applied.

At a minimum, my application will:
1. Provide a menu asking the type of calculation needed (discount or best buy)
2. Based on the selection appropriate prompts should be presented
3. For best buy;
a. Ask for the cost of at least two products
b. Ask for the mass or quantity of the products
c. Tell the user which product is better value
4. For discount, consider a case where either the percentage discount is given, or the prices before and
after discount are given.
a. For the first case, you should ask the user for the ticket price and percentage discount then tell
the user the unit price after discount
b. For the second case, you should ask the user for the price before discount and after discount in
order to inform the user of the percentage discount
c. Finally, tell the user of the best deal

Expert Answer


[solved] – Question 91928

Create read only: VIEW_EMPS_NO_SAL

show all of the data from employee table, department id, department name from departments table Dont show salary and commission percent employees table.

4.Create a view called: VIEW_COUNTRY_REGION_INFO

Show the country id, country name, and region name that each country belongs to. Be sure to use syntax that will allow you to rerun the code without dropping the view and make the view read only.

Create READ ONLY view: VIEW_EMP_SAL_INFO

Calculate the following: The minimum, average, maximum, and sum of all salaries,a count to show records used. Have calculations grouped by department name. need to join with the departments table Give the read only constraint the name of vw_emp_sal_info_readonly.

Run the command to Query the data dictionary USER_VIEWS, showing only the view name and the text columns. Show me the results from your query.

Expert Answer


[solved] – Question 9193

Write a function displayTotalCost prototyped by

void displayTotalCost(double totalCost, unsigned recordNum, bool aborted);

so that the execution of this function will first display the total sale cost stored in variable totalCost and the total number of sale records stored in recordNum. If aborted is true, then the function will also display an error message to the effect “Input terminated by invalid data at record” followed by the corresponding record value. For example, displayTotalCost(55.55, 3, false) could just display

Total sale cost (3 records) = $55.55

while displayTotalCost(66.66, 7, true) could display

Total sale cost (7 records) = $66.66
Input terminated by invalid data at record 8.

Expert Answer


[solved] – Question 9194

Write a function readSaleRecord prototyped by

int readSaleRecord(unsigned & itemId, double & itemPrice,
char & discountType, unsigned & quantity);

so that the execution of this function will retrieve 4 fields, i.e. the item ID itemId, the original item price itemPrice, the discount type discountType and the quantity quantity, from the stdin device. The returned value will be 0 if the reading has been successful, and will be non-zero if otherwise. In fact, when the record is not successfully read, the returned value will be 1 if it’s due to receiving 0 for the item ID or hitting the EOF, and will be -1 if otherwise.

Explain (i) what do the ampersands “&” do in the prototyping; (ii) is this function still syntactically correct if some of these 4 ampersands are removed from the function header; and (iii) will your program still work if one of these 4 ampersands is removed and why. Please also use the following interface for the input.

Enter
-> item ID: 101024
-> full item price: 199.95

Expert Answer


[solved] – Question 9199

I attempted to submit this to the C category and the website is broken and I could not submit it in 4 different browsers so I had to submit this under C++. This is a C question. Issue with isdigit. Supposed to look at the first digit and return 0 if non digit entered. It always returns a 0 no matter what. I have attempted changing count to a float. Why isn’t this working?

Win7 64
Dev C++

#include <conio.h>
#include <iostream>
#include <ctype.h>

using namespace std;

int main(int argc, char *argv[])
{

int loopCounter=0,count=0,a;

for(a=4;a>0;a–) {
printf(“Please enter a number 1 – 255: “);
scanf(“%d”,&count);
if(isdigit(count)) {
if(count<=0)
a=2;
else if(count>0 && count<256)
a=0;
else
return 1;
}
else
return 1;
}
while(count>=loopCounter) {
printf(“%dn”,count);
count–;
}
getch();
return EXIT_SUCCESS;
}

Expert Answer


[solved] – Question 91995

Write a function that takes two parameters (days_count:int, current_day: str)
where the current_day is anything from [“sun”, “mon”, “tue”, “wed”, “thur”, “fri”, “sat”]
and returns the day that occurs after the number of days_count

defget_day(days_count, current_day):
# your code here

return
example:
get_day(3, “mon”) # result ——–> “thur”
get_day(10, “wed”) # result ——–> “sat”

Expert Answer


[solved] – Question 92

Please suggest me some unique topics for final year major projects.

Expert Answer


[solved] – Question 92007

A prospect that is currently virtualized using Dell servers is willing to provide a Live Optics report to assist with sizing a partial infrastructure refresh with Nutanix.
Which two items from an approach for sampling accurate sizing data with Live Optics? (Choose one)

1. 24-hour windows during a period of peak utilization
2. 12-hour windows during any period
3. 24-hour windows during any period
4. 12-hour windows during a period of peak utilization

Expert Answer


[solved] – Question 92095

You are given with a wire of length n and you are also given with market rate of a wire of a length. The problem is to cut the wire in such a way that when you sell them the profit will be maximum.

Kindly help

Expert Answer


[solved] – Question 92164

Given 3 int values, a b c, return their sum. However, if any of the values is a teen — in the range 13..19 inclusive — then that value counts as 0, except 15 and 16 do not count as a teens. Write a separate helper “def fix_teen(n):”that takes in an int value and returns that value fixed for the teen rule. In this way, you avoid repeating the teen code 3 times (i.e. “decomposition”). Define the helper below and at the same indent level as the main no_teen_sum().

Expert Answer