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
Anna11 [10]
3 years ago
14

Write a recursive program that calculates the total tuition paid over certain number of years. The tuition goes up by 2.5% per y

ear. This method does not return any value. It displays the information and here is the call to the method and the sample output.
Computers and Technology
1 answer:
Lisa [10]3 years ago
8 0

Answer:

The program is as follows:

def calctuit(pay,n,yrs):

   if n == 0:

       return

   pay*=(1.025)

   print("Year ",yrs,": ",pay)

   calctuit(pay,n-1,yrs+1)

n = int(input("Years: "))

pay = float(input("Tuition: "))

yrs = 1

calctuit(pay,n,yrs)

Explanation:

The function begins here

def calctuit(pay,n,yrs):

This represents the base case

<em>    if n == 0:</em>

<em>        return</em>

This calculates the tuition for each year

   pay*=(1.025)

This prints the tuition

   print("Year ",yrs,": ",pay)

This calls the function again (i.e. recursively)

   calctuit(pay,n-1,yrs+1)

The function ends here

This gets the number of years

n = int(input("Years: "))

This gets the tuition

pay = float(input("Tuition: "))

This initializes the years to 1

yrs = 1

This calls the function

calctuit(pay,n,yrs)

You might be interested in
What is NOT an issue associated with tag management systems? There is no automation available for tag management systems. Managi
SSSSS [86.1K]

Answer:

Managing tags means experience with the programming language to utilize them.

Explanation:

In different markets, tags are used to assigned prices and values to different products. To make these tags "tag management systems" are deployed to manage and create these tags.

Tag management system is software, that is used to create the tags with ease. There is no need of coding or programming while creating tags.

<em>So we can say that, There is no issue of Managing tags means experience with the programming language to utilize them.</em>

5 0
4 years ago
The relationship between social media and the Internet is complex. Individual Internet behavior involves a myriad of factors tha
Artemon [7]

Answer:

Explanation:

The internet could be regarded has a marketplace or platform which gives individuals, businesses the opportunity to interact, relate, access opportunities, learn in an easy manner with the help of a data connection. The internet has redefined the process and concept of acesing information and interaction with the ease and coverage it brings. The Social media is could be seen a part of the internet platform which allows people to relate and interact, make friends, promote brands and so on. The internet and social media platforms however, in spite of its huge benefits comes with its inherent risk. Including the surge in cyber crime, immorality and information theft to mention a few. Common scenarios whereby banking details are being stolen from databases resulting in wholesale illegal transfer of funds. Issues of blackmail and violent defamation by groups of cohorts has also been a con in the advent of internet and social media, including growing trends of fake news which usually escalate tension, in which the recent unrest in my vicinity benefitted negatively from.

7 0
3 years ago
A Python data model defining the state of a game for Tic-Tac-Toe. You must fully describe the notion of a state of the game, lim
Artist 52 [7]

Answer:

Check the explanation

Explanation:

Here in this game of Tic-Tac-Toe, it is using the TPGE engine which is a Tiny Python Game Engine. Let's talk about its functions like:-

def image_type(img): In this function, it is simply taking image as a parameter and returning its object type like DISC if the image is in graphical form, TEXT if it is a string, and LINE if it is other than the mentioned object.

def convert_image(img):  In this function, it is simply taking image as a parameter and returning an equivalent graphical object as understood by John Zelle's. Mainly comparing for three things in this function and those are: if image equals to DISC then it is calling convert_circle(function), if image equals to LINE then it is calling convert_line(function), and if image equals to TEXT then it is calling convert_text(function),

def convert_circle(x): This function takes a list( a group of values) and makes a circle at the center of the window and the circle's radius is coming from the list.

convert_text, convert_line, convert_circle are only creating text, line, and circle and then returning it.

def graphical_elements(images): This function is taking image as a parameter and then extracting shape and color from the image and then calling convert_image(shape) and convert_type(shape) and it gives us graphic and kind respectively. Now it is checking whether kind equals to DISC If yes then filling color on the window else, setting the outline of the window

def run(): Here it is finally running the game with required parameters, the whole game is continously running under the while loop.

That's all

8 0
4 years ago
Pre-made, copyright-free illustrations are called __________. apps clip art graphic design stock photos
IceJOKER [234]

Answer: clip art

Explanation:

  • The clip arts are graphic images that are pre-made illustrations for the purpose of creating any medium (designs or art).
  • It has no restrictions to use them, it can be used by anyone, hence its copyright-free.
  • It comes in both electronic and printed form.
  • But mostly they are designed and distributed and used by a person in an electronic form.

Hence, the complete statement is "Pre-made, copyright-free illustrations are called <u>clip art</u>".

7 0
3 years ago
You are hired to train a group of new users to become technicians. One of your lessons is on how to construct Cat5 and Cat6 Ethe
Greeley [361]

Answer:

To ensure that the trainees are well acquainted with how to differentiate 568A cables and 568B cables, you must ensure they know appropriate color scheme pattern for the both cables. Also, they are expected to know the correct terminology when using both cables, as 568A is known as a crossover cable and 568B is known as a straight-through cable.

Explanation:

3 0
3 years ago
Other questions:
  • the task is to ask the user for three numbers and find the average which pseudocode gives you the comment outline for task​
    10·1 answer
  • Where does most of the work in creating a presentation will take place? Either formatting toolbar, normal (Slide) view, slide so
    12·2 answers
  • A statement describing both the requirements that must be met by a product or process amd the ways in which satisfaction of the
    8·2 answers
  • Brainlist will be added!✴
    6·1 answer
  • Fedora operating system
    9·1 answer
  • Your team will write a function that reverses a C-string, to practice using pointers. You must use pointers and C-strings for th
    6·1 answer
  • Power point presentation make use of pages known as
    9·2 answers
  • How many dog breed are there
    9·2 answers
  • What approach do you prefer to take when creating presentations for class projects? Would you rather use software or create pres
    12·2 answers
  • If there is a secure socket layer in place, what will you need in addition to a user id in order to access the shared files?.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!