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
Answer:
float diameter=2*r; //hold the diameter of a circle
float PI; // float variable named PI.
Explanation:
Here we have declared two variable i.e diameter and PI of type float. The variable diameter will hold the diameter of a circle i.e 2*r where r is the radius of a circle.
Following are the program in c++
#include <iostream> // header file
using namespace std; // namespace
int main() // main function
{
float r=9.2; // variable declaration
float diameter=2*r; //hold the diameter of a circle
float PI=3.14; // float variable named PI hold 3.14
cout<<"diameter IS :"<<diameter<<endl<<"PI IS :"<<PI; // display value
return 0;
}
Output:
diameter IS :18.4
PI IS :3.14
Answer:
that's an amen stop deleting our stuff deleters!.!!!!!
Answer:
The output is attached below
Explanation:
d = {}
while True:
line = input("Enter line: ")
if len(line)==0:
break
token = line.split(' ')
for var in token:
try:
if len(var)==0:
continue
count = d[var]
d[var] = count + 1
except KeyError:
d[var] = 1
pass
for word in sorted(d):
print(word , d[word])
------------------