Programming Flashcards
What is programming
process of converting ideas into instructions that a computer can understand and execute
What is a bug
something unexpected happens
What is a crash
when the program stops early or freezes
Use of many programming languages
some are good for small devices with limited memory where as others are used for complex mathematical computations
source code
instructions written for the computer in plain text i.e. no bold , italics or underline
3 ways to translate source code into machine code
- compile it
- interpret it
- combination of both
Types of languages
compiled, interpreted and combination
compiled languages
C, C++ , objective-C
interpreted languages
PHP and JavaScript
combination of compiled and interpreted languages
Java, C# and Python
IntelliSense
feature of Visual Studio code that gives code suggestions
What can python do
its a general purpose language
- web apps
- internal company tools
- scientific analysis
- create games
Syntax
rules of a programming language
Statements in programming
Individual actions you want your program to take
What are statements made of ?
- Keywords
- Expressions
- Operators
What are operators
any symbol used to calculate values after giving inputs , example : *+-
operands = inputs
how are values calculated in programming ?
In programming , multiplication and division is calculated before addition or subtraction
Multiplication comes first then divison
Addition comes before subtraction but after multiplication or division
Types of errors
- Syntax- language rules broken
- Runtime- unable to execute
- Semantic- output is not what you expected
Website to lookup any errors
stackoverflow.com
strings
letters and numbers inside a double quote, example : “umazissexy”
Rules of variables in python
- dont start with a number, it can contain letters, numbers and underscores
- spaces are not allowed in names ( yo hi)
- names are case senseitive (cookie and Cookie are different)
- variables cant be keywords
How to view all the keywords in python
its a code that needs to be run
- import keyword
- print(keyword.kwlist)
Float meaning in programming
Any number with a decimal point
Conditional/Boolean expression
Any expression that breaks down to either true or false