GoConqr has a new look! Let us know what you think.

Flashcards

CS

Kya Wilde English 27 cards

CS

Cards in this deck (27)

  1. 1PSEUDOCODEa notation resembling a simplified programming language.PSEUDOCODE
  2. 2SYNTAXSyntax Errors are the easiest to fix
    These happen when you have typed some invalid code.
    Syntax Analysis: Tokens are checked to see of they match the rules (or syntax) for the language used.
  3. 3VARIABLEVariable is any named type of storage.
    E.g. myname = input("Name:")
    myage = 14
    lastname = "Wilde"
  4. 44. DATA TYPETypes of data.
    Integers.
    Floating-Point Numbers.
    Complex Numbers.
    Strings. Escape Sequences in Strings. Raw Strings. Triple-Quoted Strings.
  5. 5STRINGString literals in python are surrounded by either single quotation marks, or double quotation marks. Strings can be output to screen using the print function. For example: print("hello")
  6. 6INTEGERDefined as int. Represents a whole number value. E.g. age = input(int("Age:"))
  7. 7FLOATfloat (floating point real values) − Also called floats, they represent real numbers and are written with a decimal point dividing the integer and fractional parts
  8. 8BOOLEANdenoting a system of algebraic notation used to represent logical propositions by means of the binary digits 0 (false) and 1 (true)
  9. 9INPUTSomething that gives a computing device data. E.g. Mouse, Keyboard...
  10. 10PRINTPrint is a function that when told to in the code, will display text.
    E.g. print("Hello")
    OUTPUT:
    Hello
  11. 11CASTINGCasting is when you convert a variable value from one type to another. This is, in Python, done with functions such as int() or float() or str() .
  12. 12IF...ELIF...ELSEThe if…elif…else statement is used in Python for decision making.
    if 100 == 100
    print("okay")
    elif 100 == 50:
    print("no")
    else:
    print("never")
  13. 13BOOLEAN OPERATORSBOOLEAN OPERATORS
  14. 14ANDa Boolean operator which gives the value one if and only if all the operands are one, and otherwise has a value of zero.AND
  15. 15ORa logical operation which gives the value one if at least one operand has the value one, and otherwise gives a value of zero.OR
  16. 16NOTA NOT gate performs logical negation on its input. In other words, if the input is true, then the output will be false.NOT
  17. 17ITERATIONIteration, in the context of computer programming, is a process wherein a set of instructions or structures are repeated in a sequence a specified number of times or until a condition is met. When the first set of instructions is executed again, it is called an iteration.
  18. 18CONDITIONThe boolean expression after the if statement is called the condition. If it is true, then all the indented statements get executed.
  19. 19RANGEThe possible values that may be stored in a variable. The upper and lower bounds of an array. An alternative to iterator.
  20. 20WHILEWith the while loop we can execute a set of statements as long as a condition is true.
    E.g. choice = "Y"
    while choice != "N"
    (the following will happen)
  21. 21FORA for loop is a loop that happens but adds one every time.
    E.g.
    For i in range
  22. 22LISTSList is a collection which is ordered and changeable. Allows duplicate members.
    E.g.
    colours=["pink","blue","red"]
  23. 23INDEXindex method finds the given element in a list and returns its position.
  24. 24VARIABLEVariables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory.
  25. 25APPENDWhen you want to add something to a list you use the function append.
    E.g. animal.append("pig")
  26. 26REMOVEWhen you want to remove something from a list you use the remove function.
    E.g.
    animals.remove("pig")
  27. 27LENlen() function is an inbuilt function in Python programming language that returns the length of the string.
    E.g.
    for i in range [0,len(students)

Information

Description
Flashcards on CS, created by Kya Wilde on 19/03/2019.
Created by
Kya Wilde
Views
5
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?