We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Oh that's funny. I was in about five problems into the Introduction section and I must have accidentally clicked the "Try a Random Challenge" button, and this came up. I had no idea it had jumped sections on me.
All I could think was "well, that escalated quickly!"
I got it right -- after a little googling to get Python class-definition syntax and how to do a cross product -- but then, this ain't my first computer language...
I suppose this is in the Classes section to show the usage of the init method and of methods in general. The weird part being that you don't have to declare member variables, you can just use them in the init method (and anywhere else?) and they stick around for the rest of the class methods to use.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Class 2 - Find the Torsional Angle
You are viewing a single comment's thread. Return to all comments →
Oh that's funny. I was in about five problems into the Introduction section and I must have accidentally clicked the "Try a Random Challenge" button, and this came up. I had no idea it had jumped sections on me.
All I could think was "well, that escalated quickly!"
I got it right -- after a little googling to get Python class-definition syntax and how to do a cross product -- but then, this ain't my first computer language...
I suppose this is in the Classes section to show the usage of the init method and of methods in general. The weird part being that you don't have to declare member variables, you can just use them in the init method (and anywhere else?) and they stick around for the rest of the class methods to use.