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
ruslelena [56]
3 years ago
14

In 2019, the tuition for a full time student is $7,180 per semester. The tuition will be going up for the next 7 years at a rate

of 3.5% per year. Write your program using a loop that displays the projected semester tuition for the next 7 years. You may NOT hard code each years tuition into your program. Your program should calculate the tuition for each year given the starting tuition in 2019 ($7, 180) and the rate of increase (3.5%). You should then display the actual year (2020, 2021, through 2026) and the tuition amount per semester for that year
Computers and Technology
1 answer:
Morgarella [4.7K]3 years ago
3 0

Answer:

In Python:

tuition = 7180

year = 2019

rate = 0.035

for i in range(2019,2027):

   print(str(year)+": "+str(round(tuition,2)))

   tuition = tuition * (1 + rate)

   year = year + 1

   

Explanation:

This initializes the tuition to 7180

tuition = 7180

This initializes the year to 2019

year = 2019

This initializes the rate to 3.5%

rate = 0.035

This iterates through years 2019 to 2026

for i in range(2019,2027):

This prints the year and tuition

   print(str(year)+": "+str(round(tuition,2)))

This calculates the tuition

   tuition = tuition * (1 + rate)

This increments year by 1

   year = year + 1

You might be interested in
What is a computing event
Firdavs [7]

Answer:

an event in a computing contex, is an action or occurence that can be identifided by a program and has significance for system hardware or software. events can be user- generated such as keystrokes and mouseclicks, or system generated, such as program loading,running out of memory and errors.

Explanation:

HOPE IT HELPS PO(◍•ᴗ•◍)❤

3 0
3 years ago
Write the constructor for the Theater class. The constructor takes three int parameters, representing the number of seats per ro
sp2606 [1]

Answer:

See explaination

Explanation:

class Seat {

private boolean available;

private int tier;

public Seat(boolean isAvail, int tierNum)

{ available = isAvail;

tier = tierNum; }

public boolean isAvailable() { return available; }

public int getTier() { return tier; }

public void setAvailability(boolean isAvail) { available = isAvail; } }

//The Theater class represents a theater of seats. The number of seats per row and the number of tier 1 and tier 2 rows are

//determined by the parameters of the Theater constructor.

//Row 0 of the theaterSeats array represents the row closest to the stage.

public class Theater {

private Seat[][] theaterSeats; /** Constructs a Theater object, as described in part (a). * Precondition: seatsPerRow > 0; tier1Rows > 0; tier2Rows >= 0 */

public Theater(int seatsPerRow, int tier1Rows, int tier2Rows) {

theaterSeats= new Seat[tier1Rows+tier2Rows][seatsPerRow];

}

public boolean reassignSeat(int fromRow, int fromCol, int toRow, int toCol) {

if(theaterSeats[toRow][toCol].isAvailable()) {

int tierDestination =theaterSeats[toRow][toCol].getTier();

int tierSource =theaterSeats[fromRow][fromCol].getTier();

if(tierDestination<=tierSource) {

if(tierDestination==tierSource) {

if(fromRow<toRow) {

return false;

}else {

theaterSeats[toRow][toCol].setAvailability(false);

theaterSeats[fromRow][fromCol].setAvailability(true);

return true;

}

}

theaterSeats[toRow][toCol].setAvailability(false);

theaterSeats[fromRow][fromCol].setAvailability(true);

return true;

}else {

return false;

}

}else {

return false;

}

}

public static void main(String[] args) {

//Lets understand it with simple example

Theater t1 = new Theater(3,1,2);

//Our threater has 3 seat in each row and we have one tier 1 row and 1 tier 2 row

//total no of seat will be 9.

//Lets create our seat

t1.theaterSeats[0][0] = new Seat(true,1);

t1.theaterSeats[0][1] = new Seat(false,1);

t1.theaterSeats[0][2] = new Seat(true,1);

t1.theaterSeats[1][0] = new Seat(true,2);

t1.theaterSeats[1][1] = new Seat(true,2);

t1.theaterSeats[1][2] = new Seat(true,2);

t1.theaterSeats[2][0] = new Seat(false,2);

t1.theaterSeats[2][1] = new Seat(false,2);

t1.theaterSeats[2][2] = new Seat(true,2);

//Lets print out theater and see which seat is available or which is not

System.out.println("Theater===>");

for(int i=0;i<3;i++) {

for(int j=0;j<3;j++) {

System.out.print("["+i+"]"+"["+j+"] : "+t1.theaterSeats[i][j].isAvailable()+" ");

}

System.out.println();

}

System.out.println("(2,1) want to change seat to (0,0)");

System.out.println("["+2+"]"+"["+1+"]"+"===>"+"["+0+"]"+"["+0+"]");

t1.reassignSeat(2, 1, 0, 0);

for(int i=0;i<3;i++) {

for(int j=0;j<3;j++) {

System.out.print("["+i+"]"+"["+j+"] : "+t1.theaterSeats[i][j].isAvailable()+" ");

}

System.out.println();

}

}

}

5 0
4 years ago
How to unblock your Wi-fi if it is blocked by your administrator .
alexgriva [62]

Answer:

you dont

Explanation:

you ask the admin to unblock it. if you dont know who did it, you had your ip grabbed and you cant do anything but call the police.

3 0
3 years ago
What is that tool that makes liquid metal? Ik I might sound dumb but I'm rlly curious
jenyasd209 [6]

Answer:

it’s called a solder. It’s used to permanently fuse two metals together. And they’re used in many different areas like construction, technology, etc.

That pic that you have i think is a computer chip or something similar.

So a solder is the tool that is used to make metal into liquid.

hope this helps and pls mark me brainliest :)

8 0
3 years ago
Word how to create a text box with lines 2013
Crank
U go on your keypad and where the numbers are at next to the 0 u see this ------------------------- so u can make lines with that


I hope this help*static*
4 0
4 years ago
Other questions:
  • A ________ is a system of hardware and software that stores user data in many different geographical locations and makes that da
    14·1 answer
  • What is the purpose of the print area feature​
    11·1 answer
  • What is a mortgage?
    8·2 answers
  • Karen is learning about searching the Internet and collaborating with other people online. ​ ​ Karen has found and removed all W
    7·1 answer
  • Question 2Write a MIPS assembly implementation of the following C/C++ code. Assume small, unsigned integer arithmetic (no range
    10·1 answer
  • What is being identified when antibodies stick to pathogens during immunostaining?
    11·1 answer
  • PLEASE HELLPPPPP EVERYONE IS IGNORING THISSSSSSSSSS
    11·1 answer
  • What is the purpose of the domain name system
    15·2 answers
  • Order the steps to add a recommended chart in excel.
    5·2 answers
  • ___1. my1st JavaProgram<br> A. valid <br> B. invalid
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!