Answer:
def index(elem, seq):
for i in range(len(seq)):
if elem == seq[i]:
return i
return len(seq)
print(index(5, [4, 10, 8, 5, 3, 5]))
Explanation:
Create a function named index that takes elem and seq as parameters
Create a for loop that iterates through the seq. If elem is equal to the item in the seq, return the i, index of the item.
If the elem is not found in the seq, this means nothing will be returned in the loop, just return the length of the seq, len(seq)
Call the function with given parameters and print the result
Note: Since 5 is in the list in the example, the index of the 5 which is 3 will be returned
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.
No.
This is because a social media company must always continue to adapt to new trends and marketing techniques in order to remain relevant to the community.
Hope this helps!
I’m making this easy & basic so if you need to use it, feel free!
Dear Future me, It feels a little strange to be writing a letter to my future self, but it’s also rather exciting! At present I am very interested in sports and am sure this is a hobby that has proved beneficial because I can hit a home run.
So tell me have things changed a lot? Do we still have a lot of restaurants? Has Artificial Intelligence proved to be taking over the world? You must be so used to social distancing while we struggle to figure out a cure.
Is our pet fish doing well or have you replaced it with robot? Ha! Ha! It’s so much easier, right?! How is your preparation for the new job? Must be really nice to be an adult! Have you changed our hair? Maybe our style? Am sure things have turned out well for you in 2030. Great talking to you! Stay safe.It’s been nice writing to you Hope this letter brings back old memories…
Sincerely, past you.