How to convert python to Pseudocode?

Viewed 43

I am learning how to use Pseudocode and have made a randomly generated 10 x 10 grid in python. I am trying to convert my python script into Pseudocode. Any suggestions?, Thanks

int main(void)
{
  int i = 0;
  while (i <= 99)
  {
    printf("%02d ", i);
    
    i++;

    if (i % 10 == 0) printf("\n");
  }

  return 0;
}

 
1 Answers

Pseudocode is a loose definition for code that is colloquially understood for roughly sketching an algorithm. The Pseudocode is express by relying on common concepts such as if,for,while and return.

Firstly the code snippet you provided does not seem to adhere to Python syntax (since it uses braces).

Secondly the snippet could be pseudocode, except for the "printf" statement which seems language specific and usually is just referred to as "print" in Pseudocode. But generally there is no right or wrong.

Related