answer.
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
timofeeve [1]
2 years ago
12

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.051) / 12 (Note: Output directly. Do not store in a variable.). c
Computers and Technology
1 answer:
qaws [65]2 years ago
3 0

Answer:

Se explaination

Explanation:

/Declaring variables

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.051) / 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

You might be interested in
When onboard and facing the bow of a boat where is the port side
topjm [15]

Answer:

im pretty sure this is common sense

Explanation:

3 0
1 year ago
You have several pictures of different sizes that you would like to frame.A local picture framing store offers two types of fram
exis [7]

Answer:

written in java

Note :  Package name was excluded

 

import java.util.Scanner;

public class Main {

   public static void main(String[] args) {

       //declared 8 uninitialised variable  

       String input;

       double cost, colorC, frameC, paperC, glassC, crownC;

       char crowns;

       int type, color, crown, length, width, area, perimeter;

       

       //creating an instance of the Scanner class to accept value from user

       Scanner scanner = new Scanner(System.in);

       System.out.print("Enter length of frame: ");

       length = scanner.nextInt();

       System.out.print("Enter width of frame: ");

       width = scanner.nextInt();

       System.out.print("Do you want a fancy frame or a regular frame\nEnter 1 for fancy, 2 for regular: ");

       type = scanner.nextInt();

       if (type == 1) {

           frameC = 0.25;

       } else {

           frameC = 0.15;

       }

       System.out.print("Do you want a white frame or a colored frame\nEnter 1 for white, 2 for colored: ");

       color = scanner.nextInt();

       if (color == 2) {

           colorC = .10;

       } else{

           colorC = 0;

       }

       System.out.print("Do you want crowns \nEnter y for yes, n for no ");

       input = scanner.next();

       crowns = input.charAt(0);

       if (crowns == 'y' || crowns == 'Y') {

           System.out.print("How many crowns?");

           crown = scanner.nextInt();

       } else

           crown = 0;

       if (crown > 0)

           crownC = crown * .35;

       else

           crownC = 0;

       area = length * width;

       perimeter = length * 2 + width * 2;

       paperC = area * .02;

       glassC = area * .07;

       cost = glassC + paperC + crownC + colorC * perimeter + frameC * perimeter;

       System.out.println("The cost of your frame is: $" + cost);

   }

}

5 0
2 years ago
Python
Sergio039 [100]

Answer:

Check the explanation

Explanation:

from random import randint

def startGame(round,p1Name,p2Name,p1Wins,p2Wins):

print("\nPlaying round", round ,"of Beat That...")

print(p1Name,"rolls")

p1 = rollDice(p1Name)

print(p2Name,"rolls")

p2 = rollDice(p2Name)

if p1 > p2:

print(p1Name,"Wins this Round!")

p1Wins += 1

elif p2 > p1:

print(p2Name,"Wins this Round!")

p2Wins +=1

else:

print("The Players Tie this Round")

return p1Wins,p2Wins

def maxNumber(num):

a = []

for i in range(len(num)):

a.append(max(num))

num.remove(max(num))

maxNum = ''.join(map(str,a))

return maxNum

def getDiceRollValue(numOfDice):

num = []

for i in range(numOfDice):

a = randint(1, 6)

num.append(a)

return num

def rollDice(playerName):

rollValue = getDiceRollValue(numOfDice)

print(rollValue)

maxNumOutofRoll = maxNumber(rollValue)

print(playerName, "chooses",maxNumOutofRoll)

return maxNumOutofRoll

def winner(p1Name,p2Name,p1Wins,p2Wins):

print("Game Score:",p1Name,"has won",p1Wins,"rounds.",p2Name,"has won",p2Wins,"rounds.")

if p1Wins > p2Wins:

print(p1Name,"Wins This Game!")

elif p2Wins > p1Wins:

print(p2Name,"Wins This Game!")

else:

print("The Players Tie the Game")

numOfDice = 2

numOfRounds = 5

p1Name = "Player 1"

p2Name = "Player 2"

p1Wins = 0

p2Wins = 0

for i in range(1,numOfRounds+1):

p1Wins,p2Wins = startGame(i,p1Name,p2Name,p1Wins,p2Wins)

winner(p1Name,p2Name,p1Wins,p2Wins)

8 0
2 years ago
You use the _____ sheet in the format cells dialog box to position data in a cell by centering it, for example.â
Murljashka [212]
The alignment sheet

The alignment sheet in the format cells dialog box is used to position data in a cell by left or right aligning, centering, aligning at the top or bottom and rotating as well. For instance, if you choose to enter 90 in the degree area, the text will read vertically from bottom to top in the cell.


3 0
2 years ago
Suppose you are given three data items that indicate a starting index in a list, an array of characters, and an array of link in
Artemon [7]

Answer:

see explaination

Explanation:

INCLUDE Irvine32.inc

;declare the variables

SPACE = 32

startIndex = 1

.data

statement BYTE "The correct sequence of array: ",0

; declare the chars('H','A','C','E','B','D','F','G')

chars BYTE 48h,41h,43h,45h,42h,44h,46h,47h

sizeOfArray = ($ - chars)

links DWORD 0,4,5,6,2,3,7,0

outputArray BYTE sizeOfArray DUP(?)

.code

main PROC

; assign starting index

mov eax,startIndex

; assign offset of array chars

mov ebx,OFFSET chars

; assign the size of the array

mov ecx, sizeOfArray

; assign the offset of array links

mov edi,OFFSET links

; assign the offset of new array

mov esi,OFFSET outputArray

; call the traverseLink procedure

call traverseLink

; display the characters of new array

mov edx,OFFSET statement

call writeString

; assign the offset of new array

mov esi,OFFSET outputArray

; assign the size of the array

mov ecx, sizeOfArray

; call the procedure printArray to print the ordered array

call printArray

exit

main ENDP

traverseLink PROC

forLoop:

; get the character at index eax

mov dl,[ebx+eax]

; assign it to new array

mov [esi] , dl

; get the value at the next index

mov eax,[edi+eax*4]

; goto next location of new array

inc esi

; repeat until ecx=0

loop forLoop

ret

traverseLink ENDP

printArray PROC

forLoop:

; get the character at index eax

mov al,[esi]

; print the character

call WriteChar

; increament esi to get next character

inc esi

; print the space character

mov al,SPACE

call WriteChar

loop forLoop

call Crlf

ret

printArray ENDP

END main

7 0
1 year ago
Other questions:
  • Float_abs - return bit-level equivalent of absolute value of f for * floating point argument f. * both the argument and result a
    8·1 answer
  • To gain experience of using and combing different sorting algorithms: election sort, insertion sort, merge sort, and quick sort.
    14·1 answer
  • Kendall receives an email stating that a leading computer company is giving away free computers, asking her to forward the email
    15·1 answer
  • What output is produced by the following program segment? Why? (Recall that name.charAt(i) is the i-th character in the string,
    11·1 answer
  • Axel is finally documenting his work. What could he be writing?
    12·1 answer
  • Identify two entities and 2 of their attributes from the given scenario.
    9·1 answer
  • Nancy would like to configure an automatic response for all emails received while she is out of the office tomorrow, during busi
    13·2 answers
  • A bicycle sharing company is developing a multi-tier architecture to track the location of its bicycles during peak operating ho
    11·1 answer
  • Which phrase best describes a scenario in Excel 2016?
    9·1 answer
  • What does NOT match with Agile Manifesto?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!