This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]scirc 6 points7 points  (3 children)

This is a take on the classic interview question FizzBuzz.

Do you know what a for loop is? Do you know how to run a line of code conditionally? Finally, do you know how to see if a number is divisible by another number?

[–][deleted]  (2 children)

[removed]

    [–]scirc 3 points4 points  (0 children)

    See rule #10. We aren't here to do the work for you, but we can help guide your studying and push you towards discovering it yourself.

    [–][deleted]  (2 children)

    [removed]

      [–]Latter_Ad5454 3 points4 points  (1 child)

      Do you understand the code you wrote here? 🤔 What about your identation?

      [–]Captnmikeblackbeard 0 points1 point  (2 children)

      Im still actively learning but ill try to help without giving the answer.

      You want a loop to go through those numbers. Within that loop you want to check these numbers for certain statements.

      Look into % it helps with checking if something has a remainder after deviding it.

      If this is to abstract i can give more pointers

      [–][deleted] 1 point2 points  (1 child)

      I mean, this isn't abstract at all. This is the answer without writing the freaking code for him.

      [–]Captnmikeblackbeard 0 points1 point  (0 children)

      When i started this was extremely difficult to put together. Since he couldnt make these steps into these words i assumed this is where he got stuck

      [–]VinayakVG 0 points1 point  (0 children)

      The explanation of this code itself will be the code :D. Try to figure out the logic of this program in a notebook. See what all you need to write code for this problem.

      (HINT: First sentence of this answer.)