Chapter 53 - Programming basics Flashcards
What is an algorithm?
» A set of rules or a sequence of steps specifying how to solve a problem
What is pseudocode?
» Shows the important aspects of coding without an syntaxes
What is a comment?
» Allows you to document your code and explains what the code does
What is an integer?
» A whole number
What is a real/float?
» Number with a fractional part which can be negative
What is a character?
» A letter or a number
What is a string?
» Anything enclosed in quote marks or double quotes
What does the round function do?
» Round the number
What does the div function do?
» Return the whole numer
What does mod do?
» Finds the remainder
What does len(string) do?
» Returns the length of a string
What does string.find(str) do?
» Determines if str occurs in string
» Returns index if found
» Returns -1 otherwise
What does ord(“a”) do?
» In this case returns the integer value of a character
» 97 in this example
What does char(97) do?
» Returns the character represented by an integer
What is concatentation?
» Where you join 2 string together
» Do it by using + operator