Questions tagged [pseudocode]

Pseudocode is a compact and informal high-level description of a computer programming algorithm. It represents the code and may look similar to the code or code constructs, but it isn't actual code. It is a representation of the code or code construct. Use this tag for questions which are about pseudocode. Do not use this tag for questions which include pseudocode incidentally.

An easy way of understanding pseudocode is by comparing it to the actual programming language.

For example, you would like to write a code that checks if the student's grade is above the permissible threshold, and if it is then you would like to indicate that the student passed.

This is how it is achieved in Python:

if studentsGrade >= 70:
    print("Student passed")
else
    print("Student failed")

Pseudocode to describe the abovementioned code will be as follows:

if a student's grade is greater than or equal to 70
    Print "Student passed"
else
    Print "Student failed"
1942 questions
0
votes
1 answer

Best way to split text into sentences avoiding acronyms clashes

Given the following phrase Ms. Mary got to know her husband Mr. Dave in her trip to U.S.A. and it was cool. Did you know Dave worked for Microsoft? Well he did. He was even part of Internet Explorer devs. What is the best "pseudo-code" way to…
user4014815
0
votes
1 answer

How to read dale-chall mathematical notation?

How do I calculate this dale-chall mathematical notation? or how is it converted to easier pseudo code? I am trying to understand this concept to implement a text readability analyzer. Is it like the following? altough ... how is what comes after…
user4014815
0
votes
1 answer

Managing tasks without using the system clock

For the sake of argument i'm trying to define an algorithm that creates a pool of tasks (each task has an individual time-slice to operate) and managing them without the system clock. The problem that i've encountered is that with each approach that…
Erez
  • 37
  • 1
  • 8
0
votes
1 answer

using insertion sort once in quicksort

According to here Use insertion sort...for invocations on small arrays (i.e. where the length is less than a threshold k determined experimentally). This can be implemented by simply stopping the recursion when less than k elements are left,…
Celeritas
  • 14,489
  • 36
  • 113
  • 194
0
votes
0 answers

Decrypting a string knowing both the encrypted string and the password used to encrypt the string

If I have an encrypted string and the password used to encrypt this string but do not have the encryption method, would it be possible to decrypt the string? For example I am given string 02061258adfa677fa1655f8993c4e35f And I am told that the…
Rarw
  • 28
  • 3
0
votes
2 answers

Towers of Hanoi Iterative Solution Issue

I am having trouble with an iterative solution to the Towers of Hanoi puzzle. As this was a university task, we have been given pseudo-code to follow. Towers(number, src, dest, alt) begin push { number, src, dest, alt } while NOT…
SuperDicko
  • 278
  • 2
  • 4
  • 15
0
votes
1 answer

Matlab PRBS 4 waveform generation

I have a variable which has values of PRBS 4 sequence. Output = [0 0 0 1 0 0 1 1 0 1 0 1 1 1 1]; I want to plot this in Matlab. I know I have to use idinput() function to generate prbs sequences. But I am using an old version of Matlab and this…
nkp
  • 13
  • 6
0
votes
1 answer

How to convey this formula in Excel?

I've been trying to write an excel formula but have been having no luck in making it work. I can easily write the formula in pseudo code, but cannot convert it to excel! IF (ISERROR(A) OR A == 0) { IF (ISERROR(B) OR B == 0) { return…
SGHAF
  • 105
  • 1
  • 1
  • 5
0
votes
1 answer

Non-binary pseudo random sequences

PRBS sequences are for binary bits 0 and 1. Using two PRBS 7 sequence I have generated the next level sequence having 4 symbols, A, B, C and D. In one sequence, I have some combination of A,B,C and D repeating. The repetition occurs after 127 bits…
nkp
  • 13
  • 6
0
votes
1 answer

Octopress: how to mark up pseudocode?

I'd like to include some pseudocode on my Octopress-powered blog. However, I'm not sure what to do here - code markup isn't really what I need, because I'm not really writing code, or at least any code I can find in the list of those available to…
Koz Ross
  • 3,040
  • 2
  • 24
  • 44
0
votes
1 answer

struggling with my pseudocode

I'm about to build a program written in pseudocode. I've already done most of the work , but I'm stuck on the code and I don't know what to do exactly. im a begginer and not everything is clear to me ...in one of the tasks i have to do , i have to…
domingo
  • 3
  • 2
0
votes
2 answers

Characteristics of an Ellipse

I have a stream of data (sin, cos) coming into a limited resource FPGA. By limited I mean I cannot afford to instantiate a massive block-ram to store an entire cycle of Sin and Cos data. This data IF plotted forms an ellipse (this can see this via…
Naib
  • 999
  • 7
  • 20
0
votes
1 answer

IDA * Pseudocode explanation

I am trying to implement IDA* algorithm for n-puzzle problem. i find some difficulty in understanding Pseudo code which explained in IDA * what is cost(node, succ)? - is that f value? what is the value that i should pass in cost(node, succ) in t…
iPhone Guy
  • 1,285
  • 3
  • 23
  • 34
0
votes
1 answer

How can a random number be produced with decreasing odds (approaching zero) towards its upper boundary?

I want a random number generator that almost never produces numbers that are near a given upper boundary. The odds should drop linearly to 0 to the upper boundary. This is possibly best suited as a math-only question, but I need it in code form…
Hamster
  • 2,962
  • 7
  • 27
  • 38
0
votes
1 answer

3D Matrix traversal Big-O

My attempt for the Big-O of each of these two algorithms.. 1) Algorithm threeD(matrix, n) // a 3D matrix of size n x n x n layer ← 0 while (layer < n) row ← 0 while (row < layer) col ← 0 while (col < row) …
user3818430
  • 119
  • 1
  • 3
  • 8
1 2 3
99
100