Chapter 3 : Programming languages Flashcards
Making a simple calculator. Input and output in Python. Make a Python program. Adding two numbers. Choose a lnaguage. Source code and machine code.
1
Q
How you do output text on python
A
print (“text”)
2
Q
How do you output variables on python
A
print (variable)
3
Q
How do you change a variable to interger
A
int(variable)
4
Q
What are the colours of Python? What do they represent?
A
- Red : error
- Black : symbols and variables
- Green : string text
- Purple : input and output
5
Q
What are the two kinds of loops?
A
- Conditional Loop
- Counter loop
6
Q
What are the three Python data types?
A
- String
- Integer
- Float