返回卡包市场

2 Programming

暂无描述。系统推荐的高质量记忆内容,适合每天坚持背诵学习。

卡片总数: 24内容版本: v4公开卡包更新时间: 8/1/2026

卡片预览 (24 张)

#1
正面 (问题)

What is declaration?

背面 (解答)

Declaration is telling the computer what the identifier (name) should be and what type of data should be stored for a variable.

#2
正面 (问题)

What is assignment?

背面 (解答)

The allocation of data values to variables, constants, arrays and other data structures so that the values can be stored.

#3
正面 (问题)

what is a variable

背面 (解答)

Value that can change during the running of a program. By convention we use lower case to identify variables (eg a=12)

#4
正面 (问题)

what is a constant?

背面 (解答)

Value that remains unchanged for the duration of the program. By convention we use upper case letters to identify constants. (e.g. PI=3.141)

#5
正面 (问题)

what are data structures?

背面 (解答)

a data structure refers to a way of organizing and storing data in a computer so that it can be accessed and used efficiently. e.g. arrays, 2-D arrays, data types.

#6
正面 (问题)

what do we use to show indices in python? e.g. if someone wants to find out the answer to 2^3

背面 (解答)

2 ** 3, which equals 8

#7
正面 (问题)

What is input?

背面 (解答)

Input is collecting data, usually through the keyboard it is data sent to a computer to be processed

#8
正面 (问题)

What is input in pseudocode and in python?

背面 (解答)

psuedocode: name <— USERINPUT python: name = str(input(“Enter your name: “)) psuedocode: variable = USERINPUT

#9
正面 (问题)

What is output?

背面 (解答)

Output is putting data onto the screen, usually as text it is processed info that is sent out from a computer

#10
正面 (问题)

What is output in pseudocode and in python?

背面 (解答)

psuedocode: OUTPUT “text” python: print(“text”)

#11
正面 (问题)

What are the data types?

背面 (解答)

Character Real String Integer Boolean

#12
正面 (问题)

What is Character data?

背面 (解答)

Character data is a single letter of text data Eg. ‘a’

#13
正面 (问题)

What is Real data?

背面 (解答)

Real data is decimal numbers. Eg. ‘0.55’

#14
正面 (问题)

What is String data?

背面 (解答)

String data is text data (multiple characters). Eg. “Hello”

#15
正面 (问题)

What is Integer data?

背面 (解答)

Integer data is whole numbers. Eg. ‘12’

#16
正面 (问题)

What is Boolean data?

背面 (解答)

Boolean data is a true or false value. Eg. ‘True’ or ‘False’

#17
正面 (问题)

What does the type of data determine?

背面 (解答)

The type of the data determines how it is stored and what you can do with the data.

#18
正面 (问题)

What is casting?

背面 (解答)

Casting is the process of converting data from one type to another.

#19
正面 (问题)

What are the reasons for casting?

背面 (解答)

One of the most common reasons for casting is output. Output must be formatted as a string, and so we may need to convert a certain piece of data to a string. All input also comes as a string, and must then be converted to other data types.

#20
正面 (问题)

How do you cast to a string?

背面 (解答)

Casting to a string can be done by using the str function Eg. str(3) gives “3”

#21
正面 (问题)

How do you cast to an integer?

背面 (解答)

Casting to an integer can be done using the int function. Eg. int(3.4) gives 3

#22
正面 (问题)

How do you cast to a real?

背面 (解答)

Casting to a real can be done using the real function. Eg. real(“3.4”) gives 3.4

#23
正面 (问题)

What are operators?

背面 (解答)

Operators are symbols that represent a specific function within a program

#24
正面 (问题)

What are the Arithmetic operators?

背面 (解答)

Integer division Modulus/modulo operator Basic Operators