Mid-Term Review

Mid-Term Review

University

14 Qs

quiz-placeholder

Similar activities

Archivos C

Archivos C

University

9 Qs

Word

Word

University

10 Qs

Docker basic

Docker basic

University

14 Qs

akt🖥️

akt🖥️

University

15 Qs

DOS y sus comandos

DOS y sus comandos

University

9 Qs

file type

file type

10th Grade - University

15 Qs

INTRODUCTION TO LINUX

INTRODUCTION TO LINUX

University

14 Qs

C++ Faili (1)

C++ Faili (1)

University

12 Qs

Mid-Term Review

Mid-Term Review

Assessment

Quiz

Computers

University

Hard

Created by

Zach Hopton

Used 3+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which of the following would correctly match Swiss license plates, which had the format of two capital letters followed by any digit, 1–6 times? For example: ZH22106, AG1, SO200 

^([A-Z][A-Z])?\d{1,6}$ 

^\w+[123456789]+$

^[A-Z][A-Z]\d{1,6}$

^[A-Z]{2}\d{1,6}$ 

2.

MULTIPLE SELECT QUESTION

1 min • 1 pt

I'm in a directory containing all the SAC yearbooks. How could I count the number of times that a German sentence is followed by a sentence in Italian? 

ggrep -Ph "<s" *.txt|ggrep -P -A 1 "de"|ggrep -Pc "it" 

ggrep -Ph "<s" *.txt|ggrep -P -o -A 1 "de"|ggrep -Pc "it"

ggrep -Ph "<s" *.txt|ggrep -P -A 1 "de"

ggrep -Ph "<s" *.txt|ggrep -P -B 1 "it"|ggrep -Pc "de" 

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Still in the SAC yearbooks directory: How many different token forms of the lemma “avoir” are in the corpus? 

ggrep -Ph "avoir" *.txt|sort|uniq|wc 

ggrep -Ph "\tavoir$" *.txt|sort|uniq|wc 

ggrep -Ph "\tavoir$" *.txt|uniq|wc 

ggrep -Ph "\tavoir$" *.txt|sort|uniq –c|sort -rn

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In the SAC corpus, what are the three most common lemmas with the tag “NN”? 

ggrep -Phi "\tNN\t" *.txt|ggrep -Po "\b[^\t]+$"|sort|uniq -c|sort -rn|head -n 3 

ggrep -Phi "NN" *.txt|ggrep -Po "\b[^\t]+$"|sort|uniq -c|sort -rn|head -n 3 

ggrep -Phi "\tNN\t" *.txt|ggrep -Po "\b[^\t]+$"|sort|uniq|wc 

ggrep -Phi "\tNN\t" *.txt|ggrep -Po "\b[^\t]+$"|sort|uniq –c|head –n 3 

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid use of the range function in a for-loop? 

for i in range(3, 7): 

for i in range(7): 

for i in range(5, 15, 2) 

All of the above.  

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output of the following code snippet? 

0 1 2 

1 2 

0

0 1 

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Consider the following code. How many times is "Python" printed? 

5

3

6

0

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?