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
Natalka [10]
3 years ago
9

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 (currentPrice * 0.045) / 12.
Computers and Technology
2 answers:
Sonja [21]3 years ago
7 0

Answer:

integer currentPrice

integer lastMonthPrice

integer changeLastMonth

float mortagage

//Reading input

currentPrice = Get next input

lastMonthPrice = Get next input

//Calculating price change

changeLastMonth = currentPrice - lastMonthPrice

//Calculating mortagage

mortagage = (currentPrice * 0.045) / 12

//Printing output

Put "This house is $" to output

Put currentPrice to output

Put "\nThe change is $" to output

Put changeLastMonth to output

Put " since last month." to output

Put "\nThe estimated monthly mortgage is $" to output

Put mortagage to output

-Dominant- [34]3 years ago
4 0

Answer:

  1. current_price = int(input("Enter current price: "))
  2. l_price = int(input("Enter last month price: "))
  3. for i in range(1, 13):
  4.    print("Current price: $" + str(current_price) + ",  Last month price: $" + str(l_price))  
  5.    l_price = current_price
  6.    current_price += (current_price * 0.045) / 12

Explanation:

The solution code is written in Python 3.

Firstly, get user input for current price and last month price (Line 1 -2).

Create a for loop to traverse through the number from 1 to 12. In the loop, print the current price and last month price (Line 5). Before proceeding to the next round of loop, set the current_price to l_price and then apply the given formula to recalculate the estimated monthly mortgage and assign it to current_price (Line 6-7).

You might be interested in
One of the most common encryption protocols in use today. It is an asymmetric protocol that enables the sharing of a secret key
Thepotemich [5.8K]

Answer:

This explanation is true.

Explanation:

The most common forms of encryption used today are;

  • Data Encryption Standard / DES
  • Triple DES
  • Advanced Encryption Standard / AES
  • Twofish

which are mostly symmetric encryption protocols. They use the same key codes for both parties involved in the communication process.

Asymmetric Encryption is widely used in daily communications that is done over the internet and it uses different keys for each party. The public key encrypts the message and then it is sent over to the recipient. The secret key which they have exchanged is then used the decrypt the message.

I hope this answer helps.

7 0
3 years ago
T/F The two primary sections of the CPU are the arithmetic/logic unit and the control unit
sashaice [31]
True because cpu are the arithmetic/logic units and the control unit
4 0
3 years ago
Someone is retiring next year. What would be an appropriate amount of risk to take their investments?
slamgirl [31]
B...............................
7 0
2 years ago
Read 2 more answers
Company A is setting up a network of mostly Windows machines. Which networking file system protocol would you recommend for maxi
maxonik [38]

Answer:

For maximum interoperability, NFSv4 is recommended.

Explanation:

When setting up a network of mostly windows machines, it is better to use NFSv4 because it includes performance improvements, mandates strong security, and a stateful protocol.

4 0
3 years ago
Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output tho
katen-ka-za [31]

Answer:

import java.util.Scanner;

public class BasicInput {

   public static void main(String[] args) {

       //Create an object of the Scanner class

       Scanner scnr = new Scanner(System.in);

       

       //Define int and double variables

       int userInt;

       double userDouble;

       

       //Define char and string variables similarly

       char userChar;

       String userString;

       

       //Prompt the user to enter an integer

      System.out.println("Enter integer:");

       //Store the input in the integer variable

       userInt = scnr.nextInt();

       

       //Prompt the user to enter a double

        System.out.println("Enter double:");

       //Store the input in the double variable

      userDouble = scnr.nextDouble();

       

       //Prompt the user to enter a char

        System.out.println("Enter char:");

       //Store the input in the char variable

      userChar = scnr.next().charAt(0);

       

       //Prompt the user to enter a string

        System.out.println("Enter String:");

       //Store the input in the string variable

      userString = scnr.next();

       

       //Output the four values on a single line

       //separated by a space

       System.out.println(userInt + " " + userDouble + " " + userChar + " " + userString);

       

   }

   

}

Sample Output:

Enter integer:

>>12

Enter double:

>>23

Enter char:

>>s

Enter String:

>>asdasd

12 23.0 s asdasd

Explanation:

The code above has been written in Java. It contains comments explaining every part of the code. Please go through the comments.

5 0
2 years ago
Other questions:
  • 2. Now write a program named filereader.py that reads and displays the data in friends.txt. This program should also determine a
    5·1 answer
  • Many computers today use _____ which is a coding scheme using at least 16 bits to represent a character.
    10·1 answer
  • Consider the provided C++ code in the main.cpp file: The function func2 has three parameters of type int, int, and double, say a
    8·1 answer
  • Alice and Bob decide to communicate using NTRUEncrypt with parameters (N, p, q) = (7, 3, 29). Alice’s public key is h(x) = 3 + 1
    15·1 answer
  • What are registers in ICT used for?
    5·1 answer
  • Which company was the first to develop personal computers?
    6·1 answer
  • Nia is editing a row in an Access table. The row contains the Pencil icon on the left end of the record
    12·2 answers
  • Where in PowerPoint should a user navigate to complete the tasks listed below?
    6·1 answer
  • Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither.
    5·1 answer
  • How would you use keywords and Boolean operators to help you with a web search?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!