How to Feng Shui Your Bedroom
Q&A for How to Write Pseudocode
Coming soon
Search
-
QuestionIs programming always required?Community AnswerPseudocode isn't real code, but details what a program should do step by step. Knowing how to write code is necessary to writing meaningful and useful pseudocode.
-
QuestionHow can I tell the difference between an odd and even number using pseudocode?Community AnswerDivide it by two to see if you get a remainder. If not, then it's even; if yes, then it's odd.
-
QuestionHow do I spot errors in pseudocode?ScratchlessCommunity AnswerSince pseudocode isn't real code, there can't be any errors. You decide what you want to write as pseudocode and then translate it to any coding language you'd like.
-
QuestionWhere can I write pseudocode?Community AnswerWhen you start jotting it down it can be anything from a notepad to a napkin or a dedicated writing application like Word or Google Docs. Once you start detailing your pseudocode I recommend switching over to a plain text/raw text (.txt) application such as Notepad, TextEdit, WordPad, and then begin translating it to actual code gradually. It's very important to remember that a computer CANNOT execute code written in a formatted document file, such as .doc or .docx, pdf. They can only interpret .txt plain text, made into something like a .jar, .class, etc (developer file formats). You cannot run code with just raw text. Remember to make it a dev file first.
-
QuestionIs pseudocode necessary for programming?Community AnswerIt isn't exactly necessary, but knowing pseudocode helps in learning how to program faster.
-
QuestionHow do I write pseudocode?Community AnswerFollow the steps here to learn!
-
QuestionCan I use words such as "count" to sum up data in writing a pseudocode?Community AnswerYou can do whatever you like in pseudocode! Just as long as you know how to convert it to actual code, anything goes.
-
QuestionIs verbal the right word?Community AnswerVerbal works in this context: as in "relating to or in the form of words." In your head, as you read the article, try replacing "verbal" with "written out in words."
-
QuestionCan I use dedicated/made-up functions (i.e. PLAYSOUND, MAKE, READ, WRITE, etc.)?ScratchlessCommunity AnswerOf course. You decide what you write in pseudocode. It won't come up with any errors and as long as you know how to code it into a programming language you should be fine.
-
QuestionHow do I write pseudocode for a switch case structure?Community AnswerBecause switch statements are essentially nested if-else statements, you can use if statements. For example, you could use if for each case and else for the default.
-
QuestionIs pseudocode and algorithm the same, or different?Graham TrottCommunity AnswerDifferent. An algorithm is a set of steps to perform a given function; pseudocode is just one way of describing those steps. The steps can be expressed in a conventional programming language or in pseudocode. The former will actually run; the latter will not until translated into computer code. Unless, that is, someone writes a compiler to handle your pseudocode. That's not as silly as it may sound; languages like Apple's HyperTalk closely resemble pseudocode.
-
QuestionHow to pseudocode for functions? Do we simply write 'call for function()'?Community AnswerA function in real code is like "when FUNCTION_NAME is runned, do:". You can use "when FUNCTION_NAME is runned, do:" for a function Pseudocode start.
-
QuestionWhat are global variables?Community AnswerVariables that can be used throughout the entire program. A local variable can only be used in the part that created the local variable.
-
QuestionWrite a pseudocode to input the temperature in Fahrenheit and convert it into Celsius?Simeon WatsonCommunity Answerfahrenheit = input "Temperature in degrees Fahrenheit: " write {fahrenheit} degrees Fahrenheit equals {(fahrenheit-32)/1.8} degrees Celsius.
-
QuestionHow do I write a pseudo code for an algorithm that reads grocery lists and prints out the products needed in alphabetical order?Simeon WatsonCommunity AnswerYou would do that as follows: Access camera. Write "point camera to grocery list" if camera registered type = "text": list = camera read top-to-bottom list sort alphabetically write list
-
QuestionWrite a Pseudocode that will accepts two integers and calculate the sum, product and average of the two inputted integers. Display the results.Simeon WatsonCommunity AnswerThat would be written as: integer1 = integer(input(Integer 1: )) integer2 = integer(input(Integer 2: )) sum = integer1 + integer 2 product = integer1 * integer2 average = (integer1 + integer2)/2 write { Sum = [sum] Product = [product] Average = [average] }
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit