Answer:
are u sure this is the right question?
Explanation:
<span>The calculatePrice() method can be written in C. It will use and return doubles (which allows for decimals). It will calculate the house price of $100K + $20K per bedroom and $30K per bathroom. Next it will take that price and append the sales percentage and return that value.
double calculatePrice(decimal numBedrooms, decimal numBathrooms, decimal salesPercentage)
{
decimal housePrice = 100000 + (20000 * numBedrooms) + (30000 * numBathrooms);
return housePrice + (housePrice * salesPercentage);
}</span>
Answer:
\n
Explanation:
readline() method is used to read one line from a file. It returns that line from the file.
This line from the file is returned as a string. This string contains a \n at the end which is called a new line character.
So the readline method reads text until an end of line symbol is encountered, and this end of line character is represented by \n.
For example if the file "abc.txt" contains the lines:
Welcome to abc file.
This file is for demonstrating how read line works.
Consider the following code:
f = open("abc.txt", "r") #opens the file in read mode
print(f.readline()) # read one line from file and displays it
The output is:
Welcome to abc file.
The readline() method reads one line and the print method displays that line.
Powerpoint, word document, and excel