Search Header Logo

Unit- 5

Authored by Dhanalakshmi Venkatesh

Computers

University

5 Questions

Used 1+ times

Unit- 5
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

CARS="bmw"

  case "$CARS" in

       "mercedes") echo "Headquarters - Affalterbach, Germany" ;;

    "audi") echo "Headquarters - Ingolstadt, Germany" ;;

       "bmw") echo "Headquarters - Chennai, Tamil Nadu, India" ;;

esac

Headquarters - Affalterbach, Germany

Headquarters - Ingolstadt, Germany

Headquarters - Chennai, Tamil Nadu, India

none of the above

2.

OPEN ENDED QUESTION

3 mins • 1 pt

x=1

while [ $x -le 5 ]

do

echo "Welcome $x times"

x=$(( $x + 1 ))

done

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

i=10

until [ $i == 1 ]

do

echo "$i is not equal to 1";

i=$((i-1))

done

echo "i value is $i"

echo "loop terminated"

Evaluate responses using AI:

OFF

4.

OPEN ENDED QUESTION

3 mins • 1 pt

i=1

weekdays="Mon Tue Wed Thu Fri"

for day in $weekdays

do

echo "Weekday $((i++)) : $day"

done

Evaluate responses using AI:

OFF

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements that are used to control shell loops?

A. break

B. continue

C. Both A and B

D. None of the above

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?