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
2 answers

How to Interpret pseudocode in c#?

I have a data interpretation algorithm & actual data. Using this algorithm, I have to interpret the actual data and display it as a report. For this, Firstly I need to create a form which will accept some variable values from user. The variables…
Uma Ilango
  • 968
  • 4
  • 16
  • 31
0
votes
3 answers

How do I find the optimal function input integer (X) to get closest to a target output (Y)?

This answer relates to an excel macro in VBA and I am looking for the optimal solution. The answer can be provided in Pseudo Code, Python, Java or Excel compatible VBA. The approach should be able to written in Excel VBA. If you have alternative…
Steve
  • 2,764
  • 4
  • 27
  • 32
0
votes
3 answers

Translating a mips pseudo instruction 'rol'

I'm trying to translate the mips pseudo instruction rol (rotate left). I need to translate it before I can submit an assignment, which is unfortunate because the pseudo instruction worked quite well for me. The instruction was, rol $s4,$s4,…
user201535
  • 87
  • 1
  • 5
  • 15
0
votes
2 answers

Child access parent isolated scope: cell content access cell scope

I may be a bit confused about scope (I've read a lot of tutorials about it, but at this point I don't understand how to make this thing), anyway, this is what I'm trying to do: I have a table with various cells
Francesco Belladonna
  • 11,361
  • 12
  • 77
  • 147
0
votes
4 answers

Avoiding recursion

I have a method, which gives me the required number of Boxes based on number of devices it can hold.Currently i have implemented this logic using recursion private uint PerformRecursiveDivision(uint m_oTotalDevices,uint m_oDevicesPerBox, ref uint…
0
votes
1 answer

recursive pseudocode: order of execution of print statements

I am not sure what the following code will print out. Can someone please explain in the best detail possible? Is this recursion? void h ( int n ) if ( n >= 4 ) h ( n / 2 ) end if print n end h What is printed when the call h (16)…
0
votes
1 answer

Program win32 installer from scratch

I want to recreate a basic Windows installer, like the ones nullsoft or innosetup produce, but in Java. Unfortunatly, I'm a bit lost for some points. First of all I'd have to copy the software data to Program Files, this point seems clear to me. But…
Antoine C.
  • 3,730
  • 5
  • 32
  • 56
0
votes
5 answers

Button handling (pseudocode/c)

I have a button, and I want it to react according to the actions of the user. Here it is: You can see that it has 4 different states. A first one is when no perticular action is performed (NONE), a second one is when the mouse pointer hovers the…
Antoine C.
  • 3,730
  • 5
  • 32
  • 56
0
votes
1 answer

How to find whether two trees are structurally same using level order traversal?

I came up with an algorithm to check if two trees are structurally similar i.e. the data at the corresponding nodes in the two trees may be different but if a node in tree1 has one left child then it's corresponding node in tree2 must have one left…
Dubby
  • 1,154
  • 3
  • 16
  • 31
0
votes
4 answers

Help with understanding Pseudo-code

Can someone please tell me how I can implement the following line of pseudo-code. c[k]=c[k] (mod M) with |c[k]|<=M/2 I do not understand what the 'with' means, does it mean that I have to ensure that after reduction modulo M, c[k] must be less than…
Mohammad Sepahvand
  • 17,364
  • 22
  • 81
  • 122
0
votes
1 answer

Function of this graph pseudocode

procedure explore(G; v) Input: G = (V;E) is a graph; v 2 V Output: visited(u) is set to true for all nodes u reachable from v visited(v) = true previsit(v) for each edge (v; u) 2 E: if not visited(u): explore(u) postvisit(v) All this pseudocode…
Dubby
  • 1,154
  • 3
  • 16
  • 31
0
votes
2 answers

Need help determining the lowest and highest value within an algorithm using pseudocode

I'm having a lot of trouble dealing with with a particular question in my critical thinking class. The task is this: Task Develop an algorithm to prompt for and obtain maximum daily temperatures for a whole year. However, in order to consider leap…
Smash
  • 21
  • 1
  • 7
0
votes
1 answer

pseudo code in python

I am fairly new to python One of the exercises I have been given is to create the python pseudo code for the following problem: write an algorithm that given a dictionary (list) of words, finds up to 10 anagrams of a given word. I'm stuck on ideas…
dhali
  • 386
  • 1
  • 6
  • 27
0
votes
1 answer

How to add 2 digital waveform graphs, constructed from lists of points?

Assume I have 2 lists of points (x,y) representing digital waveform graphs, which I can iterate through from left to right and which always start and end on y = 0. For example: Graph1 = [(0,0) (0,3) (4,3) (4,0) (9,0) (9,1) (11,1) (11,3) (15,3)…
Chris
  • 13
  • 3
0
votes
1 answer

Javascript css selector for nested classes

I am creating a CSS selector for homework. I have managed to extract and get single selectors - e.g. #_id, but I cannot work out how to get a result for nested ones such as : div#_id._class [NOTE: I cannot use any libraries to do this or…
user1044585
  • 493
  • 2
  • 5
  • 19
1 2 3
99
100