To register your interest for the Summer Week of Code 2022, please fill out this form: https://forms.gle/DkgKQpLMoajf3kn87
A user is in a haunted house and needs to find his way out!
He has to always choose between 3 doors he could walk through. However, there is a ghost behind randomly one of them!
Everytime the user goes through a door:
If there's no ghost his score increases by 1 and he is asked again to choose between 3 doors again (loops).
But if the ghost IS behind the door he picks. It's game over and the score should be displayed.
Write (Pseudocode or Data Flow Diagram) and then the Python Code. Both should be submitted!
Given an array of integers, output the positions (indexes) of the two numbers so that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9,
OUTPUT --> [0, 1].
Write (Pseudocode or Data Flow Diagram) and then the Python Code. Both should be submitted!