The method is an illustration of loops or iteration.
Loops are used to carry out repetitive operations.
The removeDuplicates method in Python is as follows, where comments are used to explain each line.
#This defines the method
def removeDuplicates(list):
#This initializes the output list
outputList = []
#This iterates through the list
for i in list:
#All elements not in the output list, are appended to the output list
if i not in outputList:
outputList.append(i)
#This returns the output list
return str(outputList)
At the end of the method, the new list contains <em>no duplicates</em>.
Read more about similar program at:
brainly.com/question/6692366
You can use special tools such as boxes in word processors and presentation programs to create flowcharts on a computer.
Explanation:
Word processors are the software to produce documents like reports, manuscripts, books, and letters. Microsoft word is the most popular word processing software. There are various formatting tools available in it to make the document easier to read and understand.
To create flowchart in MS-word-
- Click insert
- Click Shapes for drop down menu
- Find arrow lines and boxes to create flowcharts.
ofcourse within 34-35 Days
Maybe its true i am not sure
Answer:
def doMyMath(n):
if n == 1:
return n
else:
return n*doMyMath(n-1)
Explanation:
This line defines the function
def doMyMath(n):
This line checks if n is 1. If yes, it returns n (1)
if n == 1:
return n
If otherwise, it calculates the fibonacci recursively
else:
return n*doMyMath(n-1)
To call the function from main, you can use:
print(doMyMath(5))
or
num = int(input("Number: "))
--- This gets the number from user
print("Result: ",doMyMath(num)) --- This calculates the factorial
<em>This question is answered in Python</em>