1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alinara [238K]
4 years ago
11

House real estate summary Sites like Zillow get input about house prices from a database and provide nice summaries for readers.

Write a program with two inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (current_price * 0.051) / 12. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value)) Ex: If the input is: 200000 210000 the output is: This house is $200000. The change is $-10000 since last month. The estimated monthly mortgage is $850.00.
Computers and Technology
1 answer:
Ksivusya [100]4 years ago
6 0

Answer:

current_price = int(input("Enter the current price: "))

last_months_price = int(input("Enter the last month's price: "))

print("This house is $" + str(current_price))

print("The change is $" + str(current_price - last_months_price) + " since last month")

print("The estimated monthly mortgage is ${:.2f}".format((current_price * 0.051) / 12))

Explanation:

Ask the user to enter the current price and last month's price

Print the current price

Print the change in the price, subtract the last month's price from the current price

Print the estimated monthly mortgage, use the given formula to calculate, in required format

You might be interested in
A web based application that integrates html code with business logic is said to be in violation of what design principle?
adoni [48]

A web-based application that combines HTML code with business logic exists said to be in violation of Protection from variations design principle.

<h3>What is Html?</h3>

The Hypertext Markup Language or HTML stands for the standard markup language for documents developed to be displayed in a web browser. It can be administered by technologies such as Cascading Style Sheets and scripting languages such as JavaScript. HTML (Hypertext Markup Language) exists as the code that is used to structure a web page and its content. For example, content could be structured within a group of paragraphs, a list of bulleted points, or using photos and data tables

The protected variations pattern protects components from the variations on other elements (objects, systems, subsystems) by wrapping the direction of instability with an interface and operating polymorphism to make various implementations of this interface.

Hence, A web-based application that combines HTML code with business logic exists said to be in violation of Protection from variations design principle.

To learn more about Hypertext Markup Language refer to:

brainly.com/question/5560016

#SPJ4

5 0
2 years ago
What can be written to perform a certain number of iterations or to iterate until a specific result is achieved?
OlgaM077 [116]

Answer:

The answer to this question is given below in the explanation section. However, the correct option is B. i.e a for loop.

Explanation:

The correct answer to this question is for-loop. Beause, in the for loop is written to perform a certain number of iterations or to iterate until a specific result is achieved.

for example, to calculate the average of 10 numbers, we use the for loop to iterate statements written in its body 10 times to calculate the average.

when the specific numbers of the iteration are reached it will get terminated.

for example

for (int i=0; i<=10; i++)

{

// perfrom average, code

}

this loop iterate 10 times or less, when it reached above the limit it gets stopped.

however, the other options are not correct, because an ordered data structure is like a list of order data, print function print something to the user or on screen. while an array is like a list of data of the same data type.

7 0
3 years ago
Is there a way for me to play a .mp3 file from my computer using Atom?
krek1111 [17]

They have a sound package. More info here: https://atom.io/packages/sound

7 0
3 years ago
Write a C++ program to find all numbersless than 1000 which are:
Elden [556K]

Answer:

The c++ program is shown below.

#include <iostream>

using namespace std;

int main() {    

   cout<<"Numbers less than 1000 which are divisible by 7"<<endl;    

   for(int k=1; k<1000; k++)

   {

       // number should give remainder 0 which show complete divisibility

       if(k%7 == 0)

           cout<<k<<"\t";

   }    

   cout<<endl<<"Numbers less than 1000 which are divisible by 11"<<endl;    

   for(int k=1; k<1000; k++)

   {

       if(k%11 == 0)

           cout<<k<<"\t";

   }    

   cout<<endl<<"Numbers less than 1000 which are divisible by 7 but not divisible by 11"<<endl;    

   for(int k=1; k<1000; k++)

   {

       // for 11, number should not give remainder 0 which shows incomplete divisibility

       if(k%7 == 0 && k%11 != 0)

           cout<<k<<"\t";

   }    

   cout<<endl<<"Numbers less than 1000 which are divisible by 7 and divisible by 11"<<endl;

   

   for(int k=1; k<1000; k++)

   {

       if(k%7 == 0 && k%11 == 0)

           cout<<k<<"\t";

   }    

   cout<<endl<<"Numbers less than 1000 which are not divisible by 7 and not divisible by 11"<<endl;    

   for(int k=1; k<1000; k++)

   {

       if(k%7 != 0 && k%11 != 0)

           cout<<k<<"\t";

   }    

   return 0;

}

Explanation:

The test for divisibility is done by using the modulus operator which is used as a condition inside the if statement. This test is done inside for loop.

All the numbers from 1 to 999, less than 1000, are divided by 7 and/ or 11 depending on the sub question. Only the numbers which are completely divisible are displayed. Divisible numbers give remainder 0 always.

The divisibility test by 7 is shown below.

cout<<"Numbers less than 1000 divisible by 7"<<endl;    

   for(int k=1; k<1000; k++)

   {

       if(k%7 == 0)

           cout<<k<<"\t";

   }    

In other words, all the numbers divisible by 7 are same as the numbers in the table of 7.

The same logic shown above is applied for other sub questions to test for divisibility by 11 and combination of 7 and 11.

To improve readability, tabs and new lines are inserted at appropriate places.

8 0
3 years ago
What are two reasons for entering the ping 127.0.0.1 command on a windows pc?
Hunter-Best [27]

127.0.0.1 is the loopback Internet Protocol (IP), the address is used to establish an IP connection to the same computer being used by the end-user.

The some reason that a person will command a ping 127.0.0.1 in a command prompt is because they will check if the NIC and drivers implementation is functional and it used in testing the TCP/IP.

4 0
4 years ago
Read 2 more answers
Other questions:
  • A custom date format set for a date/time field that contains the symbols mmm/dd/yy would display the date as ____.
    12·1 answer
  • Compute the sum of all integers that are multiples of 9, from 1 to 250. Enter your result of your computation in the text box be
    9·2 answers
  • Where can you access all the formatting options for worksheet cells?
    5·1 answer
  • A windows host sends a tcp segment with source port number 1200 and destination port number 25. the sending host is a(n) _______
    10·1 answer
  • In real-world environments, risks and their direct consequences will most likely span across several domains. However, in the la
    12·1 answer
  • Microsoft’s SharePoint server product dramatically altered the content and records management (RM) markets. Crocker (2015), edit
    6·1 answer
  • A(n) ___________ analyzes traffic patterns and compares them to known patterns of malicious behavior.
    8·1 answer
  • a hacker who plants a rogue wireless access point on a network in order to sniff the traffic on the wired network from outside t
    12·1 answer
  • When you move into a new home or apartment, the first thing on your checklist should be to have the ____________ changed. (5 Let
    13·1 answer
  • When investigating the serial position curve, delaying the memory test for 30 seconds
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!