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

Sum of Numbers Design a function that accepts an integer argument and returns the sum of all the integers from 1 up to the numbe

r passed as an argument. For example, if 50 is passed as an argument, the function will return the sum of 1, 2, 3, 4, . . . 50. Use recursion to calculate the sum. Demonstrate the function in a program.
Engineering
1 answer:
cestrela7 [59]3 years ago
4 0

Answer:

# define main to get an argument from the user, call the function, and display the final values

def main():

 # ask an argument from the user.

 number = int(input('Enter a positive integer: '))

 # solve the integral thing of the number by putting the user's argument in the addition() function

 finalSum = addition(number)

 # display the final value integral thing

 print("The integral of this number is ", finalSum, ".")

# define an addition function to find the integral

def addition(num):

 # make an if-statement to test filter things out of your calculations. In this case, 1.

 if num == 1:

   #if 1, return 1. because 1 + (1 - 1) = 1

   return 1

 # this is where the recursion actually is. This is the part that calculates

 else:

   return num + addition(num-1)

# call your main function

main()

Explanation:

This is written in Python. A link to the output can be found below.

https://Sum-of-Numbers.hufflepuffler07.repl.run

You might be interested in
For the following gear train, if the blue gear is moving at 50 rpm, what are the speeds of the other gears?
Flauer [41]

Answer:

6

Explanation:

6 teddy bears

5 0
3 years ago
Your manager has asked you to research and recommend a writing guide that examiners in your digital forensics company can use fo
vivado [14]

Answer:

Kindly Check the explanation

Explanation:

Report

A Report is a way to present the forensic examination result in front of judge. A report contains warrants, all affidavits issued for arrest, expenses occur during forensic test and lists of evidence. Apart from evidence a report also contains expert opinions.  

Guidelines  

These are the set of rules and written statement which are used to present the important information in a structured and clear format. The main motive behind to define the guidelines is to achieve standardization in the reports. It also improves the readability of the report.  

Guidelines for report  

Abstract:  

Each report must contain an abstract of the report which gives the brief review about the report. It came at the starting of the report. The main motive behind to give abstract is to give brief about report to someone in a very less time. The size of abstract must not be more than one page.  

Index:  

Each report must contain an index which display's which content is available at which page of report. The content of index must be appropriate and clear so that the reader will not get confuse.

Format of report:

The formatting of report is also one of the essential parts of the guidelines. It makes the report attractive and also due to this reader not gets bored while reading the report. The guidelines regarding layout of report are as follow:  

1. Use time roman font and 12 font size as a default font to explain anything in the report.  

2. The explanation must be justified

3. As possible divide the long paragraph. if possible explain in points.

4. The page must have border on all sides

5. Each pages must have numbering and footer

Rules for grammar:

1. The language of the report must be simple and clear. So that everyone can understand it easily.

2. Avoid repeating same sentence or word again and again.

3. Use active instead of passive voice, in order to give importance to doer.

4. Write expressions between commas.

5. Avoid spelling mistakes in report which also make wrong impact.

6. As possible give heading or subheading to material or explanation which must be accurate.

7. Explain, new or difficult words used in the report.

8. What ever written in the report must be through the point and accurate on bases of fact.

Body of report:

The body of the report referred to as a content written inside the report. In order to write an impressive report, it must include all these things:

1. Avoid use of hypothetical question, if still hypothetical question arises it must be bases on factual evidence.  

2. Add all the affidavits and warrants in the report issued for search and arrest.

3. The cost money expenses while solving the case.

4. The expert opinion which must be bases on knowledge or previously declare case results.

5. The list of people and evidence which are collected and interrogative during the investigation.

6. If investigation is further going on than write the area in which the investigation further goes on and also mention when the investigation get complete.  

Forensic software used:  

A short must be given about the software used in the investigation. The result generated by the software must also be pasted in that report. It is more good if attach the snap shot of the result. Add any previous case result in which the same software result is taken as evidence, in order to justify that the result generated by the software is true. Some of forensic softwares are FTK, ProDiscover, Hexworkshop. The result of these softwares must be heighted so that everyone can notice it.  

Conclusion:  

The conclusion must be given at the end of report to tell according him what result came after investigation. In conclusion also write on which basis the result concludes. There must be strong behind the conclusion.  

References:  

In Reference write all the cases, thesis, books which an investigator followed to solve the current case. In addition if they referred any internet article. They can also write the website name where  that article lies. In short can say that write everything where they got an idea which is helpful in solving the case.

 

8 0
3 years ago
6. Driving with parking lights only (in place of headlights) is against the law. A. True B. False
trasher [3.6K]

Answer:

B false it is illegal to only have got fog lights on though and bright headlights because it can distract other drivers going last and if the y are distracted then that will cause a collision

Hope this helps :)

Explanation:

4 0
3 years ago
Read 2 more answers
Which crystal system(s) listed below has (have) the following relationship for the unit cell edge lengths?
lianna [129]

Answer:

Both B and G ( Hexagonal and Tetragonal )

Explanation:

The crystals system listed below has the following relationship for the unit cell edge lengths; a = b ≠ c ( hexagonal and Tetragonal )

hexagonal ; represents  a crystal system  which has three equal axes that have an angle of 60⁰ between them while Tetragonal denotes crystals that have  three axes which have only two of its axes equal in length.

5 0
3 years ago
A large increase in elevation can cause a carbureted engine to run ________ if not properly adjusted for the altitude. a Rich b
mash [69]

Answer:

B - Poor

Explanation:

As you get higher up, There is less oxygen which causes the engine to create less power.

3 0
3 years ago
Other questions:
  • 1. Looking at the case study provided under the Companion Material section, what is the main problem that is addressed in this c
    13·1 answer
  • Students are expected to respond to one of the two questions described below. Students should provide examples to clarify their
    12·1 answer
  • Define volume flow rate Q of air flowing in a duct of area A with average velocity V
    12·1 answer
  • Which part does NOT rotate when the engine is running and the clutch pedal is depressed?
    7·1 answer
  • Which option identifies the type of engineering technician most likely to be involved in the following scenario?
    9·1 answer
  • How do you build a house.
    15·1 answer
  • A jointed arm robot can rotate on the following 6 axes?
    8·1 answer
  • What is the purpose of encryption?
    13·1 answer
  • 10.) A solid circular titanium control rod at 7,000 lb axial tension force where stress must not
    15·1 answer
  • Write down the three formula to find the three types of slope of curve Q with respect to L.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!