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
astra-53 [7]
3 years ago
10

Suppose that the tuition for a university is $10,000 this year and increases 4% every year. In one year, the tuition will be $10

,400. Write a program using for loop that computes the tuition in ten years and the total cost of four years’ worth of tuition after the tenth year.

Computers and Technology
1 answer:
seropon [69]3 years ago
7 0

Answer:

<em>The programming language is not stated; however, I'll answer using Python programming language (</em><em>Se</em><em>e attachment</em><em> </em><em>for</em><em> </em><em>proper </em><em>for</em><em>mat</em><em>)</em>

tuition = 10000

rate = 0.04

for i in range(1,15):

tuition = tuition + tuition * rate

if i <= 10:

print("Year "+str(i)+" tuition:",end=" ")

print(round(tuition,2))

if i == 14:

print("Tuition 4th year after:",end=" ")

print(round(tuition,2))

Explanation:

<em>The first 2 lines initializes tuition and rate to 10000 and 0.04 respectively</em>

tuition = 10000

rate = 0.04

<em>The next line iterates from year 1 to year 14</em>

for i in range(1,15):

<em>This line calculates the tuition for each year</em>

tuition = tuition + tuition * rate

<em>The next 3 lines prints the tuition for year 1 to year 10</em>

if i <= 10:

print("Year "+str(i)+" tuition:",end=" ")

print(round(tuition,2))

<em>The next 3 lines prints the tuition at the 4th year after year 10 (i.e. year 14)</em>

if i == 14:

print("Tuition 4th year after:",end=" ")

print(round(tuition,2))

You might be interested in
Did the Z3 computer invented by Konrad Zuse have a negative effect on society?
musickatia [10]

Answer:

Explanation:

Không

4 0
2 years ago
Read 2 more answers
Farah works in an office with two other employees. All three share a printer and an Internet connection. The utility that makes
NNADVOKAT [17]

Answer: SOHO

Explanation: I hope this help you out!

5 0
3 years ago
Read 2 more answers
What is the use of consonant in QBASIC ? Answer me in short and easy answer.​
Digiron [165]

Answer:

See Explanation

Explanation:

I'll assume the question is about the use of constants in QBasic because consonants do not have any special function or usage in QBasic.

In simple terms: In QBasic, constants are used to represent elements that do not change in value during program execution.

Take for instance, you intend to use \pi in your program.

Its value is \pi = 3.142

So, 3.142 will always be a constant in your program. One of the ways it can be used in a program is:

10 LET PI = 3.142

<em>The above represents a numeric constant. QBasic also have string constants.</em>

3 0
3 years ago
Assume inputFile is a Scanner object used to read data from a text file that contains a number of lines. Each line contains an a
anzhelika [568]

Answer:

words.hasNext()

Explanation:

Given the code snippet below:

  1.        while (inputFile.hasNextLine()) {
  2.            String word = "";
  3.            String line = inputFile.nextLine();
  4.            Scanner words = new Scanner(line);
  5.            while (words.hasNext()) {
  6.                word = words.next();
  7.            }
  8.            System.out.println(word); }
  9.    }

We have a inputFile Scanner object that can read data from a text file and we presume the inputFile has read several rows of data from the text file. So long as there is another line of input data available, the outer while loop will keep running. In each outer loop, one line of data will be read and assign to line variable (Line 3). Next, there is another Scanner object, words, which will take the current line of data as input. To get the last word of that line, we can use hasNext() method. This method will always return true if there is another tokens in its input. So the inner while loop will keep running so long as there is a token in current line of data and assign the current token to word variable. The word will hold the last token of current line of data upon exit from the inner loop. Then we can print the output (Line 8) which is the last word of the current line of data.

7 0
3 years ago
Petra has an interview with an IT company. What technique can help prepare her?
SVEN [57.7K]
I would go C because that way it gets her prepared to answer any techie questions they would have for her and would make her a better option.
3 0
2 years ago
Read 2 more answers
Other questions:
  • What are the five types of pointing devices?
    11·1 answer
  • When the minnesota timberwolves encouraged facebook fans to post a great shot of a dunk onto its pinterest page for a chance to
    6·1 answer
  • What is the use of pecil icon
    11·2 answers
  • 1. [2 points] Write a function to compute the volume of a sphere, given its radius. 2. [2 points] Write a recursive function to
    7·1 answer
  • Which guideline should you use when downloading software from the Internet?
    15·1 answer
  • linda has written a program that works well on various operating systems, but she needs to increase the readability of the progr
    5·1 answer
  • For the recursive method below, list the base case and the recursive statement, then show your work for solving a call to the re
    8·1 answer
  • Every workplace should have an emergency plan of action.
    15·2 answers
  • What was the name of the first personal computer and what year was it introduced
    7·1 answer
  • What are the different types of computer operating systems?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!