- 4
Can someone help me out with this program? I've tried a couple of codes but all of them had errors
Mary rotates 90 degrees every minute and starts rotating north each time. Based on these assumptions, write a program that shows in what geographical direction Mary is after that minute. The following table gives examples of inputs and outputs: Input Output 1 East 15 West Input input consists of only one line specifying the number of minutes of Mary rotation. Output The output of your application must include geo-directions. South, West, North, East
1 Réponse
+ 1
Hi there,
1) We are expected to show our work. We don't ask people to do all of our work, because:
i) it doesn't teach, it's passive learning.
ii) it wastes the helper's time for things we could do ourselves, instead, and
iii) coded form clarifies a question, shows where a person goes wrong which then lets the helper know what to suggest. Code is easier to play around, can be separately commented on, shared, and saved.
It's due to all these, I'm guessing, that you got downvoted.
2) Your question statement is unclear. You should have said "everytime, Mary starts rotating from the North." or that Mary's initial position is always North.
You could have also added that she rotates clockwise.
Only the sample inputs and outputs clarify the question. It's really not clear what it asks without those.
Anyways, because it's been 2 days and you haven't really updated your situation:
https://code.sololearn.com/c1a6KAAimj5u/?ref=app
The 2nd one in the code is much easier, the 1st one is just to explain the math