返回卡包市场

12.05/12.06/12.07 - Assignments/Logic statements/Loops

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

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

卡片预览 (13 张)

#1
正面 (问题)

What does the following pseudocode do? “INPUT Number”

背面 (解答)

It stores a value that is input in a variable with the identifier ‘Number’ Assigning a value

#2
正面 (问题)

What does the following pseudocode do? “NumOfGuesses <– 1”

背面 (解答)

Stores the value 1 in the variable with the identifier ‘NumOfGuesses’ Assigning a value

#3
正面 (问题)

What does the following pseudocode do? “NumOfGuesses <– NumOfGuesses+1”

背面 (解答)

It takes the value stored in ‘NumOfGuesses’, adds 1 to that value and then store the new value back into the variable ‘NumOfGuesses’ Updating a value

#4
正面 (问题)

What does the following pseudocode do? “Value2 <– Value1”

背面 (解答)

It takes the value in ‘Value1’ and copies it to ‘Value2’ Value in ‘Value1’ remains the same Copying a value

#5
正面 (问题)

How to swap the content of 2 variables?

背面 (解答)

We first need to store one of the values in another variable temporarily. Then we copy the content in the 2nd variable into the 1st variable. Then the content in the temporary variable is copied into the 2nd variable.

#6
正面 (问题)

Why cant the content in 2 variables directly be swapped?

背面 (解答)

Beacuse the second value to be moved over written by the first value to be moved

#7
正面 (问题)

What is a logic proposition?

背面 (解答)

A condition uses atleast one logic proposition. Logic propositions use the rational (comparison) operators

#8
正面 (问题)

Conditions are either…

背面 (解答)

…True or False

#9
正面 (问题)

How to form more complex conditions in pseudocode?

背面 (解答)

Using the logical operators AND, OR and NOT

#10
正面 (问题)

What are the 3 types of loops?

背面 (解答)

• REPEAT…UNTIL • FOR…NEXT • WHILE…ENDWHILE

#11
正面 (问题)

Which type of loops should be used instead of REPEAT…UNTIL if the loop should not be executed at all certain points?

背面 (解答)

WHILE…ENDWHILE

#12
正面 (问题)

Which loop type is suitable to use if the number of repetitions is known?

背面 (解答)

FOR…NEXT

#13
正面 (问题)

Which loop type is suitable to use if the statement inside might never be executed?

背面 (解答)

WHILE…ENDWHILE