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
Eva8 [605]
3 years ago
13

Develop a Python module that will prompt the user for a target sum that is greater than 0 and less than 1 for the following Geom

etric series: Geometric Series Equation The program should first make sure the target sum is within the range specified above. If not, continue to prompt the user for a target sum until it is in the specified range. The program should then compute the Geometric Series until it is greater than or equal to the target sum. The program should output the final sum as well as the number of terms required in the sequence to reach that final sum.
Computers and Technology
1 answer:
marusya05 [52]3 years ago
8 0

Answer:

see explaination

Explanation:

target_sum=float(input("Enter a target sum > 0 and <1 : ")) #asking user to enter the sum

while (target_sum<0 or target_sum>1): #if target sum not in range print the message

print("The target sum is not between 0 and 1")

target_sum=float(input("Please Enter a target sum > 0 and <1 : "))

computed_sum=0.00 #declare computed_sum

term_count=0 #declare term count and initalize to 0

r=1 #variable used to create the difference value

while computed_sum<target_sum: #iterate loop till computed sum is less than target sum

computed_sum=computed_sum+(1/(2**r)) #add previous computed sum with current term (1/2,1/4,1/8 etc)

term_count+=1 #increment term count

r+=1 #increment r value

print("Final Sum = " ,computed_sum) #finally print term count and final sum

print("Number of Terms= " ,term_count)

You might be interested in
Price of ETH coin right now?<br> Don't answer if u don't know.
zzz [600]

Answer:

58,715.40

Explanation:

5 0
3 years ago
What are Manuscript signs​
mihalych1998 [28]

Answer: See explanation

Explanation:

Manuscript signs, refers to the marks or the symbols that are used within a manuscript in order to show the necessary corrections which should be made during the preparation of a document.

Manuscript formatting is vital as it makes the manuscript easier to assess. In a situation whereby manuscripts are poorly formatted, it can be turned down by agents and publishers.

5 0
3 years ago
What is the maximum number of colors that should be used on a slide?
gavmur [86]
The most commonly accepted amount of colors on one slide is 4
7 0
3 years ago
Read 2 more answers
__________ are very simple devices that connect network components, sending a packet of data to all other connected devices.
taurus [48]

Hubs are very simple devices that connect network components, sending a packet of data to all other connected devices.

Hubs are relatively basic network connectors that send a packet of data to every other connected device. Compared to a hub, a switch is more intelligent and has the ability to filter and forward data to a specific location. Within various networks, switches are utilized. Nodes of the network are any computers or printers connected to it. A network workstation is a personal computer that is linked to a network (note that this is different form the usage of the term workstation as a high-end microcomputer). Nodes of the network are any computers or printers connected to it. A network workstation is a personal computer that is linked to a network.

Learn more about network here-

brainly.com/question/24279473

#SPJ4

8 0
1 year ago
Aria has modified the hard disk that hosts the operating system by using the fdisk command. The fdisk command indicates that the
Neko [114]

Answer:

A. Run the parted command.

D. Reboot the system.

Explanation:

Linux command line shell is a vital tooling server administration. It provides the flexibility of executing user and kernel mode commands on the command line interface.

Unlike graphic user interface operating systems, it receives typed commands on its prompt to execute tasks. The fdisk command shows the newly created partition on a disk, and to reload, the parted command is executed or the system should be rebooted.

3 0
3 years ago
Other questions:
  • Which is an advantage the electronic scheduling tools have over paper calenders?​
    11·1 answer
  • There are many differenttypes of models, but an individual DSS can consist of onlyone.
    15·1 answer
  • What can you do with someone's ip address?
    9·1 answer
  • Which of the following is the strongest password? Xo795&amp;A &amp;cGo9Tz F5h#3u9g vU7#$3T sC9$d&amp;cF5h#3u9g
    13·2 answers
  • The ____ category of apps makes the computer easier for blind people to use.
    9·1 answer
  • Analog signals consists of individual electric pulses that represents bits group together into bytes {True/False}
    13·1 answer
  • A user wants to make sure he can quickly restore his computer after a drive failure to the state it was in when Windows and all
    9·1 answer
  • Given a Fahrenheit value temperatureFahrenheit, write a statement that assigns temperatureCelsius with the equivalent Celsius va
    9·1 answer
  • How can a search be narrowed to only search a particular website????
    15·1 answer
  • Language modeling incorporates rules of __. Select all that apply.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!