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
asambeis [7]
3 years ago
9

Write a function file that accepts the values of r, a and n as arguments and uses a for loop to return the sum of the first n te

rms of the geometric series. test your function for a = 3, r = 1/2 and n = 10.
Computers and Technology
1 answer:
Murrr4er [49]3 years ago
7 0

Given, a = 3, r = 1/2, n = 10

%r is common ratio

%n is number of terms

%a is the first term of the series

Sum = 0;

a = 3;

r = 1/2;

for i = 0 : 1 :  10;

Sum = Sum + a * r ^ i;

end

Sum


You might be interested in
How many string object are in 128,55 in python
cricket20 [7]

Answer:

Explanation:

In the following examples, input and output are distinguished by the presence or absence of prompts (>>> and …): to repeat the example, you must type everything after the prompt, when the prompt appears; lines that do not begin with a prompt are output from the interpreter. Note that a secondary prompt on a line by itself in an example means you must type a blank line; this is used to end a multi-line command.

Many of the examples in this manual, even those entered at the interactive prompt, include comments. Comments in Python start with the hash character, #, and extend to the end of the physical line. A comment may appear at the start of a line or following whitespace or code, but not within a string literal. A hash character within a string literal is just a hash character. Since comments are to clarify code and are not interpreted by Python, they may be omitted when typing in examples.

6 0
3 years ago
Read 2 more answers
69696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969
vlada-n [284]

ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

4 0
3 years ago
Me inculparon de crear una cuenta en Facebook y colocaron el barrio donde vivo, ¿cómo podría demostrar lo contrario? Ayuda urgen
alekssr [168]

¿Has intentado decirles que ni siquiera usas Facebook? A menos que hagas. No hay mucho que puedas hacer en una situación de "bagre". Pero la gente que lo acusa (si es que lo es) debería saber que usted es decente y que no haría una página de Facebook.Y si lo tienes. Muéstreles su página de Facebook real.
6 0
3 years ago
What is an unique text-based internet address corresponding to a computer's unique numeric IP address called
FromTheMoon [43]

Answer:

This is called a domain name

Explanation:

A domain name is an address used by internet users to access a website.

6 0
3 years ago
Which data type is also called a binary object?
Andrej [43]
Binary large objects(BLOb):this data type is also called a binary object, and its fields are called binary fields.
7 0
3 years ago
Read 2 more answers
Other questions:
  • The problem solving process begins by first ______ the problem.
    11·1 answer
  • All languages from the second generation on must be translated into machine language for the computer to be able process the inp
    8·1 answer
  • With Google Alerts you can Group of answer choices
    13·1 answer
  • Real Player, Flash Player, and Shockwave are examples of
    12·1 answer
  • If you want to start a convo go here<br> https://padlet.com/beighbay000/x0q2v6qrm46j
    11·1 answer
  • PLEASE help me RIGHT NOW!!!!!!!!! I will give a Brainly to anyone who helps me!
    15·1 answer
  • Which of the following protects intellectual property?copyright
    9·2 answers
  • Suppose within your Web browser you click on a link to obtain a Web page. The IP address for the associated URL is not cached in
    10·1 answer
  • What type of security software prevents, detects, and removes malware that tries to collect personal information or change compu
    13·1 answer
  • Can you answer this ?​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!