Programming basics Flashcards

1
Q

What is sequence in programming?

A

Code is executed line by line, one after the other

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

What is syntax?

A

The grammatical rules of a programming language

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

What is exponentiation?

A

Raising a number to a power (e.g., ‘8**2’ means 8 raised to the power of 2, which is 64)

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

What is Modulus?

A

It finds the remainder when one number is divided by another (e.g., ‘10 % 3’ results in 1)

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

What does input () do?

A

It asks the user for input, such as their name, age, or other data

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

How do you respond to user input in python?

A

You can use ‘print’ to respond with messages or calculations based on user input.

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

What are constants and variables in programming?

A

Constants hold data that doesn’t change, while variables can change their values during program execution

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

What is assignment in programming?

A

It’s the process of giving a variable a value (e.g., ‘x=5’ assigns the value 5 to ‘x’

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

Syntax error

A

A mistake in the programming code that violates the grammatical rules of a language

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

Not equal to

A

Operator (!=) that checks whether the first number and the second number are not equal

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

CamelCase

A

A naming convention in which compound words are joined together, and each word’s in initial letter is capitalised (e.g., corePrice)

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

Data types

A

Categories of values that determine what operations can be performed on them (e.g., integers, strings and floats)

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

Floor division

A

Division that rounds down to the nearest whole number (// operator)

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

Debugging

A

The process of identifying and fixing errors or bugs in a program

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