Flashcards
computer science revision

Flashcards do conjunto (22)
- 1PSEUDOCODE

- 2SYNTAX

- 3PSEUDOCODE

- 4SYNTAX
- 5VARIABLE
- 6Data type

- 7Boolean
- 8InputAn input allows a user to add something to the code for example:
what is your favourite colour?
They would then answer and then that information will be stored in the code until it is later reset. - 9printPrint allows python to output some text on a screen.
Print can output the answer to a mathematical equation.
Print can output the content of a list.
Print will turn purple if it is done correctly! - 10casting

- 11IF – ELIF – ELSE
- 12Boolean operations

- 13iterationsIterations are another way of saying loops.
Iterations allow users to be able to loop a piece of code over and over again without having to write it down.
these come as FOR and WHILE loops. - 14whileA while loop statement in Python programming language repeatedly executes a target statement as long as a given condition is true.
- 15forThe Python for statement iterates over the members of a sequence in order, executing the block each time. Contrast the for statement with the ''while'' loop, used when a condition needs to be checked each iteration, or to repeat a block of code forever.
- 16InA list is a data structure in Python that is changeable, ordered sequence of elements. Just as strings are defined as characters between quotes, lists are defined by having values between square brackets [ ]
- 17Indexsimple terms, index() method finds the given element in a list and returns its position. However, if the same element is present more than once, index() method returns its smallest/first position.
- 18valueThe value of some objects can change. Objects whose value can change are said to be mutable; objects whose value is unchangeable once they are created are called immutable.
- 19appendappend() and extend() in Python. Append: Adds its argument as a single element to the end of a list.
- 20deleteThe remove() method removes the item which is passed as an argument. If you need to delete elements based on the index (a specific item), you can use the pop() method. Also, you can use del statement to remove items from a list or delete an entire list.
- 21Lenlen() function is an inbuilt function in Python programming language that returns the length of the string.
- 22insertThe insert() method inserts an element to the list at a given index.
Informações
- Descrição
- explanations and meanings of different software and code
- Criado por
- Connor Gill
- Visualizações
- 6
- Avaliação