CS 442 Programming Languages Final (canvas quizzes)

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/80

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

81 Terms

1
New cards

(QB64) Short integer symbol

%

2
New cards

(QB64) Long integer symbol

&

3
New cards

(QB64) single-precision floating point symbol

!

4
New cards

(QB64) double-point floating point symbol

#

5
New cards

(QB64) Symbol used to prefix comments

' (apostrophe)

6
New cards

(QB64) What keyword is used to indicate the bottom of a FOR loop

NEXT

7
New cards

(QB64) What does the NOT operator look like

<>

8
New cards

(QB64) What describes the type of graphic drawn by the following command: LINE (100,100) - (150,150), 9, BF

a filled (solid) box

9
New cards

(QB64) Following the IRGB color scheme, what color would the decimal number 10 represent

bright green

10
New cards

(QB64) Output instruction

PRINT

11
New cards

(QB64) Input instruction

INPUT

12
New cards

(QB64) Comment instruction

REM

13
New cards

(QB64) Instruction to set the graphics mode

SCREEN

14
New cards

(QB64) Part of the IF statement

THEN

15
New cards

(QB64) Optional part for the FOR loop

STEP

16
New cards

(QB64) READ instruction description

get data from a DATA statement

17
New cards

(QB64) WRITE #1 instruction description

output data in CSV format

18
New cards

(QB64) INPUT #1 instruction description

output data as it would display on screen

19
New cards

(QB64) CLOSE #1 instruction description

finish using a file

20
New cards

(Awk) Special variable that gets the entire record

$0

21
New cards

(Awk) Special variable that gets the first field of a record

$1

22
New cards

(Awk) Special variable to get the record number

NR

23
New cards

(Awk) Special variable for how many fields in a record

NF

24
New cards

(Awk) Special variable for the field separator

FS

25
New cards

(Awk) Match operator

~ (tilde)

26
New cards

(Awk) Delimiter for regular expressions

/ (forward slash)

27
New cards

(Awk) Escape character

\ (backslash)

28
New cards

(Awk) Match at beginning of a pattern

^ (caret)

29
New cards

(Awk) Match at the end of a pattern

$ (dollar sign)

30
New cards

(Awk) Command line option for field separator

-F

31
New cards

(Awk) Command line option for program file

-f

32
New cards

(Awk) Command line symbol for getting input from a data file

<

33
New cards

(Awk) Command line symbol for sending output to a file

>

34
New cards

(Awk) (T/F) Awk has a "for" loop that is like the for loop in C

true

35
New cards

(Awk) (T/F) Awk has a printf statement that is like the printf statement in C

true

36
New cards

(Awk) (T/F) Even Awk programs that do not need a BEGIN pattern must start with the BEGIN pattern

false

37
New cards

(Prolog) Comment character

%

38
New cards

(Prolog) Logical OR in a rule statement

; (semicolon)

39
New cards

(Prolog) Logical AND in a rule statement

, (comma)

40
New cards

(Prolog) Marks the end of a statement

. (period)

41
New cards

(Prolog) Means "if" in a statement

:- (colon + hyphen)

42
New cards

(Whitespace) SS

push

43
New cards

(Whitespace) SLT

swap

44
New cards

(Whitespace) TSSS

addition

45
New cards

(Whitespace) TTT

retrieve

46
New cards

(Whitespace) LLL

end of program

47
New cards

(Whitespace) TLTT

input (read) a number

48
New cards

(Whitespace) TTS

store

49
New cards

(Whitespace) TSST

subtraction

50
New cards

(Whitespace) TLST

output a number

51
New cards

(Whitespace) SLS

duplicate

52
New cards

(Whitespace) STL

+1

53
New cards

(Whitespace) STSSTL

+9

54
New cards

(Whitespace) TTL

-1

55
New cards

(Whitespace) TSSTL

-1

56
New cards

(Whitespace) STTTL

+7

57
New cards

(Whitespace) What does the following program do:

SSSTSTSL

TLSTL

L

L

push a number and print it

58
New cards

(Whitespace) What does the following program do:

SSSTL

SSSTL

TTSSSSTL

TTTL

L

L

store and retrieve a number

59
New cards

(Whitespace) What does the following program do:

SSSTL

SSSTL

TSSSL

L

L

add two numbers

60
New cards

(Whitespace) What does the following program do:

SSSTL

TL

TSSSSTL

TTTL

L

L

input a character and retrieve

61
New cards

(Whitespace) According to whitespace which character should be ignored

CR (carriage return)

62
New cards

(Lisp) Lists symbol

( )

63
New cards

(Python) Lists symbol

[ ]

64
New cards

(Python) Tuples symbol

( )

65
New cards

(Python) Dictionaries symbol

{ }

66
New cards

(Lua) Arrays symbol

{ }

67
New cards

(Quantum) Flip the value of a qubit

X

68
New cards

(Quantum) Put a qubit in a state of superposition

H

69
New cards

(Quantum) Make the value of a qubit dependent on the state of another qubit (entanglement)

CNOT

70
New cards

(Quantum) Reads the state of the qubit

M

71
New cards

What language does the following code belong to: for x in rage(0,10)

python

72
New cards

What language does the following code belong to: (do ....)

lisp

73
New cards

What language does the following code belong to: for x = 1,10 do

lua

74
New cards

What language does the following code belong to: (cond ...)

lisp

75
New cards

What language does the following code belong to: def factorial (a)

python

76
New cards

What language does the following code belong to: (defun factorial (a)... )

lisp

77
New cards

Comment in Lua

-- (two dashes)

78
New cards

Used for "quoting" in Lisp

' (apostrophe)

79
New cards

Comment in Lisp

; (semicolon)

80
New cards

Comment in Python

# (pound symbol)

81
New cards

Which language uses 't' and 'nil' as values for true and false

Lisp