Answer:
Following is given the solution to question I hope it will make the concept easier!
Explanation:
Answer:
In Python:
cprice= int(input("Current price: "))
lmonth= int(input("Last month's price: "))
print("This house is $"+str(cprice))
print("The change is $"+str(cprice-lmonth)+" since last month")
print("The current mortage $"+str((cprice * 0.051) / 12)+" since last month")
Explanation:
Get current price
cprice= int(input("Current price: "))
Get last month's price
lmonth= int(input("Last month's price: "))
Print the current price
print("This house is $"+str(cprice))
Print the change
print("The change is $"+str(cprice-lmonth)+" since last month")
Print the mortgage
print("The current mortage $"+str((cprice * 0.051) / 12)+" since last month")
<span>The correct answer is Intranet chat rooms</span>
The IF statement is a decision-making statement that guides a program to make decisions based on specified criteria. The IF statement executes one set of code if a specified condition is met (TRUE) or another set of code evaluates to FALSE.
Answer:
nums = []
while True:
in = input()
if in:
nums.append(in)
else:
break
if nums:
avg = sum(nums) / len(nums)
for i in range(len(nums)):
if nums[i] == avg:
print(f"index: {i+1}")
print(nums[i])
else:
print(-1) # if there aren't any values in nums
Explanation:
Assuming that you are coding in Python 3x. The last 'else' statement is an edge case that you might want to consider, I don't know what you want to put there, but I'm just going to leave it as -1.