The dealer's cost of a car is 85% of the listed price. The dealer would accept any offer that is at least $500 over the dealer's cost. Design an algorithm that prompts the user to input the list price of the car and print the least amount that the dealer would accept for the car.

Answers

Answer 1

Answer:

Explanation:

The following code is writen in Python. It is a function called minPrice. It asks the user to input the list price of the vehicle and then multiplies that by 0.85 in order to get the dealer's cost. Then it adds 500 to that price and returns it to the user as the minimum price that the dealer would accept for the car.

def minPrice():

   list_price = input("Please enter the list price of the car: ")

   dealers_cost = int(list_price) * 0.85

   min_accepted_price = dealers_cost + 500

   print(min_accepted_price)


Related Questions

write an algorithm and draw a flowchart to calculate the sum of of the first 10 natural numbers starting from 1​

Answers

Answer:

#include <stdio.h>

void main()

{

int j, sum = 0;

printf("The first 10 natural number is :\n");

for (j = 1; j <= 10; j++)

{

sum = sum + j;

printf("%d ",j);

}

printf("\nThe Sum is : %d\n", sum);

}

Within a loop

Step 1: Initialize a variable to 1 (say x=1)

Step 2: Specifiy the condition

In this case x<=10

Step 3: Increment the variable by 1

using increment operator x++

OR

simply x+=1(x=x+1)

Step 4: Print the value of variable

Terminate the loop

Explanation:

As you will solve more complex problems, you will find that searching for values in arrays becomes a crucial operation. In this part of the lab, you will input an array from the user, along with a value to search for. Your job is to write a C++ program that will look for the value, using the linear (sequential) search algorithm. In addition, you should show how many steps it took to find (or not find) the value, and indicate whether this was a best or worst case scenario (... remember the lecture). You may refer to the pseudo-code in the lecture, but remember that the details of the output and error conditions are not specified there. Also, note that in pseudo-code arrays are sometimes defined with indices 1 to N, whereas in C++ the indexes span from 0 to N-1.
The program will work as follows. First, you should ask the user to enter the size of the array, by outputting:
"Enter the size of the array: "
to the console. If the user enters an incorrect size, you should output the error message:
"ERROR: you entered an incorrect value for the array size!"
and exit the program. If the input is a valid size for the array, ask the user to enter the data, by outputting
"Enter the numbers in the array, separated by a space, and press enter: "
Let the user enter the numbers of the array and store them into a C++ array. Up to now, this should be exactly the same code as Lab#2. Next, ask the user a value v to search for in the array (called the "key"), by outputting:
"Enter a number to search for in the array: " to the screen, and read the key v.
Search for v by using the linear search algorithm. If your program finds the key, you should output:
"Found value v at index i, which took x checks. "
where i is the index of the array where v is found, and x is the number of search operations taken place.
If you doesn't find the key, then output: "
The value v was not found in the array!"
Then indicate whether you happened to run into a best or worst case scenario. In case you did, output: "
We ran into the best case scenario!" or "We ran into the worst case scenario!"
otherwise, don't output anything.

Answers

Answer:

#include<iostream>

using namespace std;

int main() {

cout<<"Enter The Size Of Array: ";

int size;

bool isBestCase=false;

cin>>size;

if(size<=0){

cout<<"Error: You entered an incorrect value of the array size!"<<endl;

return(0);

}

int array[size], key;

cout<<"Enter the numbers in the array, separated by a space, and press enter:";

// Taking Input In Array

for(int j=0;j<size;j++){

cin>>array[j];

}

//Your Entered Array Is

for(int a=0;a<size;a++){

cout<<"array[ "<<a<<" ] = ";

cout<<array[a]<<endl;

}

cout<<"Enter a number to search for in the array:";

cin>>key;

for(i=0;i<size;i++){

 if(key==array[i]){

   if(i==0){

     isBestCase=true; // best case scenario when key found in 1st iteration

     break;

   }

 }

}

if(i != size){

 cout<<"Found value "<<key<<" at index "<<i<<", which took " <<++i<<" checks."<<endl;

}  else{

 cout<<"The value "<<key<<" was not found in array!"<<endl;

 cout<<"We ran into the worst-case scenario!"; // worst-case scenario when key not found

}

if(isBestCase){

cout<<"We ran into the best case scenario!";

}

return 0;

}

Explanation:

The C++ source dynamically generates an array by prompting the user for the size of the array and fills the array with inputs from the user. A search term is used to determine the best and worst-case scenario of the created array and the index and search time is displayed.

Complete the sentence.
If you wanted the best performance for a game that requires a powerful graphics processor and lots of memory, you
would run it on a
tablet
desktop
smartphone

Answers

You would run it on a desktop, as they usually can process things much better.

#include
main()
{
int i, n=10, rem, inc=0;
scanf("%d",&n);
for(i=1; i =3)
inc++;
else;
inc--;
}
printf("Final Value=\n",inc);
}
SOLVE THIS PROGRAM...

Answers

Answer:inpossible !889

Explanation: I npossible !889


What is the total March Expenditure now? (cell Q2)

Answers

I did a lot to do it lol was

The third assignment involves writing a Python program to compute the cost of carpeting a room. Your program should prompt the user for the width and length in feet of the room and the quality of carpet to be used. A choice between three grades of carpeting should be given. You should decide on the price per square foot of the three grades on carpet. Your program must include a function that accepts the length, width, and carpet quality as parameters and returns the cost of carpeting that room. After calling that function, your program should then output the carpeting cost.
Your program should include the pseudocode used for your design in the comments. Document the values you chose for the prices per square foot of the three grades of carpet in your comments as well.
You are to submit your Python program as a text file (.txt) file. In addition, you are also to submit a test plan in a Word document or a .pdf file. 15% of your grade will be based on whether the comments in your program include the pseudocode and define the values of your constants, 70% on whether your program executes correctly on all test cases and 15% on the completeness of your test report.

Answers

Answer:

# price of the carpet per square foot for each quality.

carpet_prices=[1,2,4]

def cal_cost(width,height,choice):

 return width*height*carpet_prices[choice-1]  

width=int(input("Enter Width : "))

height=int(input("Enter Height : "))

print("---Select Carpet Quality---")

print("1. Standard Quality")

print("2. Primium Quality")

print("3. Premium Plus Quality")

choice=int(input("Enter your choice : "))

print(f"Carpeting cost = {cal_cost(width,height,choice)}")

Explanation:

The cal_cost function is used to return the cost of carpeting. The function accepts three arguments, width, height, and the choice of carpet quality.

The program gets the values of the width, height and choice, calls the cal_cost function, and prints out the string format of the total carpeting cost.

Your supervisor has asked you to make a presentation to a group of new interns about appropriate digital communication in the workplace. Which of these keywords should you research?

A netiquette

B project management

C emojis

Answers

Answer: Netiquette

Explanation:

The keywords that'll be researched is netiquette. Netiquette, is simply made up of the words "net"which and also “etiquette,” and it has to do with appropriate behavior that are used online when communicating with someone. These importance of such rules are to enhance communication skills.

Some of the rules include the use of respectful language, large files should not be emailed but rather compressed, people's privacy should be respected etc

Your first submission for the CIS 210 Course Project should include the following functionality: - Requests the user to input his/her first name - Formats the name to capitalize the first letter and makes all remaining characters lowercase, removing any spaces or special characters - Output the formatted name to the console

Answers

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 String name;

 System.out.print("First name: ");

 name = input.next();

 name= name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();

 System.out.print(name);

}

}

Explanation:

This declares name as string

 String name;

This prompts the user for first name

 System.out.print("First name: ");

This gets the name from the user

 name = input.next();

This capitalizes the first letter of name and makes the other letters to be in lowercase

 name= name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();

This prints the formatted name

 System.out.print(name);

For which of the following tasks would a for-each loop be appropriate?
A. Reversing the order of the elements in an array.
B. Printing all the elements at even indices of an array.
C. Printing every element in an array.
D. Determining how many elements in an array of doubles are positive.
E. Determining whether an array of Strings is arranged in alphabetical order.
F. Printing every even number in an array of ints.

Answers

Answer:

The answer is "Option B, C,  and F".

Explanation:

In the For-each loop, it is used for traversing items in a sequence is the control flow expression. It typically required a loop becomes referred to it as an enhanced loop for iterating its array as well as the collection elements. This loop is a version shortcut that skips the need for the hasNext() method to get iterator and the loop and over an iterator, and the incorrect choice can be determined as follows:

In choice A, it is wrong because it can't reverse the array element.In choice D, it is wrong because it can't determine the array of positive.In choice E, it is wrong because it can't determine an array of the sting in alphabetical order.

Is a NAS just a collection of hard drives or a computer

Answers

Answer:

NAS systems are networked appliances that contain one or more storage drives, often arranged into logical, redundant storage containers or RAID.

Why is sequencing important?

A. It allows the programmer to test the code.
B. It allows the user to understand the code.
C. It ensures the program works correctly.
D. It makes sure the code is easy to understand.

Answers

Answer:

c i think but if not go with d

Answer:

C

Explanation:

It ensures the program works correctly

hope it helps!

Suppose that an intermixed sequence of push and pop operations are performed on a LIFO stack. The pushes push the numbers 0 through 9 in order; the pops print out the return value. For example"push(0); pop(); push(1)" and "push(0); push(1); pop()" are possible, but "push(1); push(0); pop()" is not possible, because 1 and 0 are out of order. Which of the following output sequence(s) could occur? Select all that are possible.
a) 12543 609 8 7 0
b) 01564 37928
c) 6543210789
d) 02416 75983
e) 46 8 75 32 901

Answers

Answer:

b) 01564 37928

e) 26 8 75 32 901

Explanation:

Pushes and pulls are the computer operations which enable the user to perform numerical tasks. The input commands are interpreted by the computer software and these tasks are converted into numeric values to generate output.

Define the meaning of software quality and detail the factors which affects the quality not productivity of a software product?

Answers

Answer:

Quality of software may be defined as the need of function and Efficiency. ... A number of factors are given below which gives the effects on quality and production capacity.

Software quality is known to be the method that tells the desirable characteristics of software products.

What are the Software Quality Factors that affects it?

The factors that influence software are;

CorrectnessReliabilityEfficiencyUsability, etc.

Therefore, Software quality is known to be the method that tells the desirable characteristics of software products.

Learn more about software quality from

https://brainly.com/question/13262395

#SPJ2

Suppose the following sequence of bits arrives over a link:
11010111110101001111111011001111110
Show the resulting frame after any stuffed bits have been removed. Indicate any errors that might have been introduced into the frame.

Answers

Answer:

ok

Explanation:

Question 4 (5 points)
The more RAM you have, the less things your computer can do at the same time.
True
False
ent:​

Answers

The correct answer is False
Other Questions
Look at pic plz help Kira ,Charlie , and Miguel have a total of $105 in their wallets . Kira has $9 less than Miguel. Charlie has 4 times what Miguel has . How much does each have ? What kinds of technological advances did aerospacelead to? help me plz I dont no 1+1 Pls help i need this quickly ill give brainliestfactor the following completely: x^3*y^2-x^2*y^3 how did shays Rebellion and how it influenced the creation of contribution. write in your own words and write like a 5th to 6th grader words with atleast 20 words then ill give brainiest How would inventions such as the smart fitting room affect retail jobs??? 3x-2y=12 and 3x+5y=33 Juan thinks that the graph of 6y + 12x = 4 is a line. a. Solve Juans equation for y. Never was given anything to help solve they just assume you know it I need help on these two questions please 1.Write the equation, then find the value of x. 2. What is the measure of ILL MARK BRAINLIEST i need help please The visualization journal focuses on imagining your past.True False Visualization allows you to dream about yourself as you grow.True False 2.The functions of the muscular system are one, to create movement by working with bones, ligaments, and tendons, two, to move food through the digestive system, three, to move blood through the body by pumping the heart, four, to produce heat, and five, to provide protection to inner organs.True ornot? What is an "armario" for?to excerciseto eat withto store thingsto record things In 2016, 5,200 parking permits were issued in a city. The number of parking permits increases by 5% every year. Let y represent the number of parking permits issued x years since 2016.Which type of sequence does the situation represent?A. The situation represents an arithmetic sequence because the successive y-values have a common difference of 1.5.B. The situation represents an arithmetic sequence because the successive y-values have a common difference of 1.05.C. The situation represents a geometric sequence because the successive y-values have a common ratio of 1.5.D. The situation represents a geometric sequence because the successive y-values have a common ratio of 1.05. The reform reaction between steam and gaseous methane (CH4) produces "synthesis gas," a mixture of carbon monoxide gas and dihydrogen gas. Synthesis gas is one of the most widely used industrial chemicals, and is the major industrial source of hydrogen. Suppose a chemical engineer studying a new catalyst for the reform reaction finds that 924. liters per second of methane are consumed when the reaction is run at 261.C and 0.96atm. Calculate the rate at which dihydrogen is being produced. . What do you think is the function of the poem in the lives of Mangyan? I don't understand how to do this Solve the inequality below:-3x +5-16ALGEBRAplease help