0
Can someone check randomness and how simple the code is?
/*At first I have to apologise for my English language, its not my mother tongue and for now I am not as fluent as I want to be. (I'll be writing this on my posts to clarify this fact)*/ After this "small" disclaimer I can move on. So I made this simple code just to show random location on Earth and say on which hemispheres the place is. Here are two questions: 1. Can I write this simpler with smaller amount of variables? 2. Is randomness wrote as it should be (maybe I missed a case that cannot happen in my code)? Thanks in advance! :) https://code.sololearn.com/WfJZT1qloRJB/?ref=app
3 Answers
+ 2
Hi Unreal Shadow,
The code seems to be correctly writtenš
Recommended is to use comments for the functionallity codes that you are using for certain tasks.
Do not forget to close the end of a line with semicolon.
Furthermore the random generation seems also to be correct.
Additional you can fuse minute1 & minute2 variables together since they have the same values. Tip:Try not to repeat
Have a look at the changes, hope it helpsšš
https://code.sololearn.com/WKPwKga9Sbab/?ref=app
+ 1
Thank you Vincent for tips and checking my code! Your version is much cleaner and better, I'll try to follow same rules to make my codes better for viewing! One more time: BIG thanks! :)
+ 1
You're welcomešš