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”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you output variables on python

A

print (variable)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you change a variable to interger

A

int(variable)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two kinds of loops?

A
  • Conditional Loop
  • Counter loop
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the three Python data types?

A
  • String
  • Integer
  • Float
How well did you know this?
1
Not at all
2
3
4
5
Perfectly