Questions
PLEASE TYPE OUT IN TEXT (please no pdf or writing) C++ PLEASE Summary For each used...

PLEASE TYPE OUT IN TEXT (please no pdf or writing)

C++ PLEASE

Summary

For each used car a salesperson sells, the commission is paid as follows: $20 plus 30% of the selling price in excess of the cost of the car.

Typically, the minimum selling price of the car is the cost of the car plus $200 and the maximum selling price is the cost of the car and $2,000.

Instructions

Write a program that prompts the user to enter:

  1. Purchasing cost of the car
  2. The minimum to be added to the purchasing cost
  3. The maximum to be added to the purchasing cost
  4. Salesperson’s fixed commission
  5. Percentage of the commission

The program should output:

  1. The minimum and maximum selling price of the car
  2. The salesperson’s commission range

Since your program handles currency, make sure to use a data type that can store decimals.

In: Computer Science

Question 3: getting diagnostics, Write a python program   Write the getting diagnostics function, which reports the...

Question 3: getting diagnostics, Write a python program  
Write the getting diagnostics function, which reports the most frequent diagnostic from the patients with the highest symptoms similarity returned by the function similarity to patients. See below for an explanation of exactly what is expected.

def getting_diagnostics(patient_set : Set[int], diagnostic_by_patient: Dict[int, str]) -> str:

""" Returns a string representing the most frequent diagnostic from the set of diagnostics (stored in the dictionary diagnostic_by_patient) of the patient_set (that is a set of ID patients with high similar symptoms) >>> getting_diagnostics({45437, 73454}, all_patients_diagnostics) 'cold'

#A small dictionary of patients diagnostics
all_patients_diagnostics = {45437: "cold", 56374:"meningitis", 54324:"food_poisoning",
16372:"cold", 73454: "cold", 35249:"pharyngitis", 44274:"meningitis",
74821:"food_poisoning", 94231:"unknown"}

Just write how it should be done assuming similarity function is already written.

"""

In: Computer Science

Solve the linear program below with python. OBJECTIVE FUNCTION:: Maximize Contribution Z=40X+26Y+66Z CONSTRAINTS: Cutting Capacity =1800min....

Solve the linear program below with python.

OBJECTIVE FUNCTION::

Maximize Contribution Z=40X+26Y+66Z

CONSTRAINTS:

Cutting Capacity =1800min.

4X+8Y+4Z< or =1800

Stitching Capacity =2100 min

6X+6Y+4Z< or=2100

Pressing Capacity=1500 min.

6X+8Y+6Z< or =1500

Maximize : Z=40X+26Y+66Z

Constraints:

4X+8Y+4Z< or =1800

6X+6Y+4Z< or=2100

6X+8Y+6Z< or =1500

In: Computer Science

Given the following tables: Aircraft (ano, amodel, mfgYr) Fleet (fno, src, dest, ano, pno) Pilot (pno,pname,gender)....

Given the following tables: Aircraft (ano, amodel, mfgYr) Fleet (fno, src, dest, ano, pno) Pilot (pno,pname,gender). Write Relational Algebra Query for the following. (i) Find those female pnames who has not taken a fleet dest of ‘Alabama’ but taken a fleet src to ‘Bahama’ (ii) Retrieve the fno, amodel of the aircraft manufactured in 2015 that the male pilot has had a flight on

In: Computer Science

human computer interaction For this example project: Designing a virtual reality program that simulates a peaceful...

human computer interaction

For this example project:

Designing a virtual reality program that simulates a peaceful environment to help people in therapy overcome pain

  1. What kind of data gathering would be appropriate to evaluate requirements? Why?
  2. What method(s) would you use to analyze the data?
  3. What kind of prototype would you use to evaluate your design during an early stage of development? Why?

In: Computer Science

PLEASE INCLUDE #FOR EACH LINE EXPLANATION Write a PYTHON PROGRAM that prompts for an integer and...

PLEASE INCLUDE #FOR EACH LINE EXPLANATION

Write a PYTHON PROGRAM that prompts for an integer and prints the integer, but if something other than an integer is input, the program keeps asking for an integer. Here is a sample session:

Input an integer: abc

Error: try again.

Input an integer: 4a

Error: try again.

Input an integer: 2.5

Error: try again.

Input an integer: 123

The integer is: 123

Hint: the string isdigit method will be useful to solve this problem, but you are not allowed to use it in this program - DO NOT US isdigit METHOD

In: Computer Science

How can AWS Cloud infrastructure be used by a university to provide remote learning to students...

How can AWS Cloud infrastructure be used by a university to provide remote learning to students enrolled in technical programs/degrees such as CS/IT? Your answer should explain the advantages in terms of AWS Infrastructure. In other words, do not talk about general advantages of Cloud.

In: Computer Science

Describe what is National Initiative for Cybersecurity Education (NICE) Framework? As a leader, how can you...

Describe what is National Initiative for Cybersecurity Education (NICE) Framework? As a leader, how can you use a NICE framework at your place of work? Do provide two examples to support your points.

In: Computer Science

Some have argued that a Nation State sponsored cyber event will only be initiated at the...

Some have argued that a Nation State sponsored cyber event will only be initiated at the onset of kinetic conflict. In a substantive post (at least 250 words or greater) develop your argument for defining when a cyber event becomes an act of war.

In: Computer Science

how would you envision the different layers defined in the OSI Reference Model to interact. how...

how would you envision the different layers defined in the OSI Reference Model to interact. how would you use the OSI model when troubleshooting a network connectivity problem

In: Computer Science

/* Assignment : Complete this javascript file according to the individual instructions given in the comments....

/* Assignment :
Complete this javascript file according to the individual instructions
given in the comments. */

// 1) Utilize comments to prevent the following line from executing
alert('Danger!');


// 2) Assign a value of 5 to a variable named x
// and print the value of x to the console


// 3) Assign a value of 10 to a variable named myNum
// and print the value of myNum to the console


// 4) Assign the product of x and myNum to a variable named myTotal
// and print the value of myTotal to the console


// 5) Assign your name to a variable named myName
// and print the result of myName + myNum to the console


// 6) Use the addition assignment operator to add 8 to the variable x
// and print the new value of x to the console


// 7) Assign the remainder of x divided by 5 to a variable named myRem
// and print the value of myRem to the console


// 8) Assign a value of 1 to a variable named i
// print i++ directly to the console


// 9) Now print ++i directly to the console


// 10) Assign (myNum === myName) to a variable named myBoo
// print the value of myBoo to the console

In: Computer Science

PRG/280 Week Two Assignment: Adding Navigation and CSS This assignment walks you through the steps of...

PRG/280 Week Two Assignment:

Adding Navigation and CSS

This assignment walks you through the steps of adding one more page to your website and writing navigation (i.e., adding hyperlinks) between the two pages. The starting point will be the GroceryHome.html page from Week One.

Hint: Copy the GroceryHome.html file to a new folder (suggested name for the folder: Week_2_Assignment) for Week Two.

Step 1) First, modify the Week Two GroceryHome.html page to add the navigation. After the opening <body> tag, but before the opening <header> tag, add the following code:

            <nav>

               <a href="GroceryHome.html">Home</a> |

               <a href="Products.html">Products</a> |

               <a href="AboutUs.html">About Us</a> |

               <a href="Contact.html">Contact</a>

            </nav>

Step 2) Save and open the modified page in a web browser, such as IE or Chrome. The page will render like the image below with the navigation links at the top of the web page. If you recall from the Week One mock-up, we wanted the navigation to be at the top right of the page, but the navigation we just added appears at the top left.

Step 3) To align the navigation to the right, add the following CSS code to the <style> tag at the bottom, placing the code before the closing </style> tag. Be sure to leave the styling for the .myColumns elements as it is.

nav {

     float: right;

     display: block;

}

Step 4) Save and refresh the GroceryHome.html page in a browser. The page will render like the image below with the navigation now nicely positioned at the top right of the page.

Note: If you haven’t already, try resizing your browser window from full-screen to small and back again and notice how the links move automatically.

Step 5) To add a new page to the website, open a new blank document in NotePad++. Just as you did in the Week One instructions, begin your new web page with the following code:

<!DOCTYPE html>

<html>

</html>

Step 6) From the menu, select File à Save As, and name the file Products.html, making sure to select the correct file extension to save the file as an HTML file (see the screenshot below of the Save dialogue box).

Note: Be sure you spell this filename properly, as it must exactly match the value of the <a> tag’s HREF attribute that you typed into the navigation section earlier in this assignment.

Hint: Be sure to save your file in the same location on your computer where you saved the home page.

Step 7) Using what you learned from Week One, add the body, title, and article to the Products.html page, as follows:

<body>

<header>

            <h1> My Products Page</h1>

</header>

<article>

This web page shows an example of using a table to display seasonal vegetables. Below is an example of what the grocery store might stock during the spring, summer, fall, and winter.

</article>

</body>

Step 8) Save and open the Products.html file in a browser. The page will render similar to the image below with a title and article text below.

Step 9) Add the same navigation you added to the GroceryHome.html page to the Products.html page. Be sure to place the code between the opening <body> and the opening <header> tags, as follows:

            <nav>

               <a href="GroceryHome.html">Home</a> |

               <a href="Products.html">Products</a> |

               <a href="AboutUs.html">About Us</a> |

               <a href="Contact.html">Contact</a>

            </nav>

Step 10) Although the navigation is not properly formatted on the Products.html page, this is a good time to test the navigation between the two web pages.

Open the GroceryHome.html page, and click on the Products link at the top (the image below highlights the Products link in the navigation).

The Products.html page will render like the image below. Clicking on the Home link will navigate back to the GroceryHome.html page (the image below highlights the Home page link on the Products page).

Note: Clicking the About Us or Contact links will result in a File Not Found error, because the HTML file names (pages) associated with those links have not yet been created. You will add those pages in future assignments.

Step 11) To format the <nav> block so the navigation floats to the right, add an external CSS file. Open a new blank window in NotePad++ and add the following code at the top:

nav {

     float: right;

     display: block;

}

Note: Adding an external CSS file gives you a single place to specify formatting rules that you can then apply to multiple web pages by pulling in that CSS file (instead of copying-and-pasting CSS formatting code multiple times). Having all the formatting code in a single place means fewer errors!

Step 12) From the menu, select File à Save As, and name the file MyStyle.css, making sure to select the correct file extension to save the file as a Cascading Style Sheets file (see the screenshot below of the Save dialogue box).

Step 13) To pull in the MyStyle.css file and make that formatting rule available to the Products page, modify the Products.html page and add the following code between the <html> and <body> tags at the top of the page. Be sure to spell the CSS filename correctly.

<head>

   <link rel="stylesheet" href="MyStyle.css">

</head>

Step 14) Save and refresh the browser for the Products.html page. Using the external CSS, the page renders like the image below with the navigation floating to the right.

Step 15) Test the navigation between the Home and Products page. The About Us and Contact links will result in a “page not found” error, as you haven’t built those pages yet.

Step 16) Now it’s time to present some organized text on your web page. You’ll use an HTML table to do this, beginning with a single table row and multiple table header tags. In the Products.html page, insert the following code for a <table> after the closing </article> tag, but before the closing </body> tag:

<table>

     <tr>

<th>Spring</th>

<th>Summer</th>

<th>Fall</th>

<th>Winter</th>

     </tr>

</table>

Step 17) Save the Products.html page and refresh the web browser. Your page should look like the image below with the seasons aligned at the bottom of the page.

Step 18) Now begin to lay out the table text more attractively. Add the following code to the end of the MyStyle.css page, after the closing curly brace } that completes the nav declaration:

td, th {

     border: 1px solid #dddddd;

     text-align: left;

     padding: 8px;

     width: 75px;

}

Step 19) Save the MyStyle.css page, and refresh the Products.html page. Your page should render like the image below with the seasons evenly spaced and outlined in a table format.

Step 20) To the Products.html file, add the following <tr> table rows and <td> table detail data. The code will go after the closing </tr> table row for the <th>Winter</th> table header, but before the closing </table> tag.

   <tr>

      <td>Asparagus</td>

      <td>Squash</td>

      <td>Pumpkins</td>

      <td>Potatos</td>

   </tr>

   <tr>

      <td>Scallions</td>

      <td>Tomatoes</td>

      <td>Cabbage</td>

      <td>Leeks</td>

   </tr>

   <tr>

      <td>Green Peas</td>

      <td>Carrots</td>

      <td>Broccoli</td>

      <td>Turnips</td>

   </tr>

Step 21) Save and refresh the web browser. Your <table> should render like the image below with all of the vegetables laid out neatly in a table.

Step 22) Verify that the files (GroceryHome.html, Products.html, and MyStyle.css) are in the same folder. Keeping related files together is extremely important to avoid broken links (the screenshot below shows all three files: GroceryHome.html, Products.html, and MyStyle.css).

Step 23) To zip the files together, select the three files then right-click (alternately, press the Alt key while the files are highlighted, then F to bring up the File menu, navigate to the Send To menu with the up/down arrow keys, then arrow right to navigate to Compressed Folder). From the pop-up menu, select Send To à Compressed (Zip) Folder. Give the zip file an appropriate name with your name or initials at the end (the screenshot below shows all the files along with the ZIP file).

Hint: Verify that there are three files in the Week2.zip file before you submit the ZIP file. To do so, double-click Week2.zip file to view the three compressed files (or press the Enter key while the file is selected).

Step 24) Submit the website as a ZIP file using the Assignment Files tab.

In: Computer Science

what is Cloud and IoT Operating Systems ?

what is Cloud and IoT Operating Systems ?

In: Computer Science

Discuss solution domains, forward vs. backward,GEN,MAY,MUST, KILL as it relates to static verification.

Discuss solution domains, forward vs. backward,GEN,MAY,MUST, KILL as it relates to static verification.

In: Computer Science

Discuss how you would envision the different layers defined in the OSI Reference Model to interact....

Discuss how you would envision the different layers defined in the OSI Reference Model to interact.


  • Provide an example of how you would use the OSI model when troubleshooting a network connectivity problem

In: Computer Science