---
# System prepended metadata

title: Prompt to filter the multiple-choice questions based on session key concepts
tags: [Prompts]

---

#### Prompt to filter the multiple-choice questions based on session key concepts.

```
You are an expert in content development in programming and have 10+ years of experience in it.

Yesterday, you created one session in which you teach programming topics, at the end of the session you tell the key takeaways of the entire session.

You also give them some MCQ questions after the session.

Today, you want to test whether the student has learned yesterday's topic well or not.
So, you decide to give them a revision test that includes 10 questions.

**Guidelines**

1. Review the questions and identify the essential testing aspects of each session's key takeaways.
2. Ensure that all the testing aspects in each session's key takeaways are unique.
3. Choose a single question from each testing aspect.
4. Select multiple alternative questions for each chosen question within the testing aspect. The number of alternatives may exceed one.

These are the key takeaways from yesterday's session:
. Positional Arguments
. Keyword Arguments
. Default values
- Default Arguments
  . Passing Immutable Objects

I have provided you the MCQ questions below, Please ask me if you have any doubts before picking questions.

Please read each question yourself like any teacher would do based on the guidelines, Do it yourself instead of writing the script.

**At the end print the picked MCQ question in this format:**

Key session takeaway

Key testing part

Picked Question Number

Picked Question Title

Picked Question Content

**At the end print the picked MCQ question in this format:**

Key session takeaway

Key testing part

Variant Question Number (a variant of actual question number )

Variant Question Title

Variant Question Content

Note:

1. Follow everything as per the given guidelines and while giving make sure each guideline step is explained clearly so that I can check whether I got the exact outcome or not.
2. Key testing part questions and key testing part questions variants separately.

For example variant questions:

## Question 3

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1, arg_2):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(name, greeting)

### Options

HelloRam
Hello Ram
TypeError
Ram Hello

### Answer

Ram Hello

## Question 4

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1, arg_2):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(greeting,name)

### Options

HelloRam
Ram Hello
TypeError
Hello Ram

### Answer

Hello Ram


# All MCQ Questions

## Question 1

### Question Text

What will be the output of the given Python code?

### Code

def add(arg_1, arg_2):
result = arg_1 + int(arg_2)
return result

a = 10
b = 2.8
result = add(a, b)
print(result)

### Options

12.8
2.8
10
12

### Answer

12

## Question 2

### Question Text

What will be the output of the given Python code?

### Code

def greet(word):
msg = "Hello " + word

name = "Anjali"
greet(word=name)
print(msg)

### Options

Hello
Hello Anjali
HelloAnjali
NameError

### Answer

NameError

## Question 3

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1, arg_2):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(name, greeting)

### Options

HelloRam
Hello Ram
TypeError
Ram Hello

### Answer

Ram Hello

## Question 4

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1, arg_2):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(greeting,name)

### Options

HelloRam
Ram Hello
TypeError
Hello Ram

### Answer

Hello Ram

## Question 5

### Question Text

What will be the output of the given Python code?

### Code

def add(arg_1, arg_2):
result = arg_1 + int(arg_2)
return result

a = 10
b = 2.8
result = add(arg_1=b, arg_2=a)
print(result)

### Options

12
2.8
10
12.8

### Answer

12.8

## Question 6

### Question Text

What will be the output of the given Python code?

### Code

def func(x, y, z=0):
result = x*y*z
return result

x = 2
y = 5
z = 1
result = func(x, y, z)
print(result)

### Options

11
20
0
10

### Answer

10

## Question 7

### Question Text

What will be the output of the given Python code?

### Code

def add(n):
n += n
return n

n = 5
n = add(n)
print(n)

### Options

5
15
10

### Answer

10

## Question 8

### Question Text

What will be the output of the given Python code?

### Code

def func(a, b):
if a > b:
result = a
else:
result = b
return result

a = 5
b = 7
result = func(b, a)
print(result)

### Options

12
TypeError
7

### Answer

7

## Question 9

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1 = "Hi", arg_2 = "Teja"):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(arg_2 = name)

### Options

Hello Ram
Teja Ram
Hai Teja
Hai Ram

### Answer

Hai Ram

## Question 10

### Question Text

What will be the output of the given Python code?

### Code

def add(n):
n += n

n = 5
add(n)
print(n)

### Options

10
5

### Answer

5

## Question 11

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1="Hai", arg_2="Teja"):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet()

### Options

Hello Ram
Hello Teja
Hai Ram
Hai Teja

### Answer

Hai Teja

## Question 12

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1, arg_2):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(arg_1=greeting,arg_2=name)

### Options

Ram Hello
HelloRam
TypeError
Hello Ram

### Answer

Hello Ram

## Question 13

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_2, arg_1="Hai"):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(arg_2=name)

### Options

Hai Teja
Teja Ram
SyntaxError
Hai Ram

### Answer

Hai Ram

## Question 14

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1, arg_2):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(arg_2=name, arg_1=greeting)

### Options

Ram Hello
HelloRam
TypeError
Hello Ram

### Answer

Hello Ram

## Question 15

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1="Hai", arg_2):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(arg_2=name)

### Options

Hai Ram
Hai Teja
Teja Ram
SyntaxError

### Answer

SyntaxError

## Question 16

### Question Text

What will be the output of the given Python code?

### Code

def string_slicing(word, end, start=0, step=1):
modified_word = word[start: end]
print(modified_word)

word = "Developer"
end = 4
result = string_slicing(word=word, end=end)

### Options

Dev
Devel
eve
Deve

### Answer

Deve

## Question 17

### Question Text

What will be the output of the given Python code?

### Code

def string_slicing(word, end, start=0, step=1):
modified_word = word[start: end: step]
print(modified_word)

word = "Developer"
start = 2
end = 7
step = 1
string_slicing(word, end, start, step)

### Options

velo
velope
elop
velop

### Answer

velop

## Question 18

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1="Hai", arg_2="Teja"):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(name)

### Options

Hello Ram
Teja Ram
Hai Teja
Ram Teja

### Answer

Ram Teja

## Question 19

### Question Text

What will be the output of the given Python code?

### Code

def pattern(word):
stars = "_ " _ 2
word = stars + word + stars

word = "Program"
pattern(word)
print(word)

### Options

- - Program\* \*
- - Program
    ** Program**
    Program

### Answer

Program

## Question 20

### Question Text

What will be the output of the given Python code?

### Code

def func(x, y, z=0):
result = x*y*z
return result

x = 2
y = 5
z = 1
result = func(x, y)
print(result)

### Options

10
11
20
0

### Answer

0

## Question 21

### Question Text

What will be the output of the given Python code?

### Code

def func(a, b):
if a < b:
result = a
else:
result = b
return result

a = 9
b = 6
result = func(b=b, a=a)
print(result)

### Options

9
TypeError
6

### Answer

6

## Question 22

### Question Text

What will be the output of the given Python code?

### Code

def func(a, b):
a = a + b
b = a - b
a = a - b
print(str(a) + " " + str(b))

a = 3
b = 6
func(a=a, b=b)

### Options

3 6
3
6
6 3

### Answer

6 3

## Question 23

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1, arg_2):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet()

### Options

Ram Hello
TypeError: greet() missing 1 required positional argument: 'arg_2'
Hello Ram
TypeError: greet() missing 2 required positional arguments: 'arg_1' and 'arg_2'

### Answer

TypeError: greet() missing 2 required positional arguments: 'arg_1' and 'arg_2'

## Question 24

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_1, arg_2):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(greeting)

### Options

HelloRam
Ram Hello
Hello Ram
TypeError: greet() missing 1 required positional argument: 'arg_2'

### Answer

TypeError: greet() missing 1 required positional argument: 'arg_2'

## Question 25

### Question Text

What will be the output of the given Python code?

### Code

def greet(arg_2, arg_1 = "Hai"):
print(arg_1 + " " + arg_2)

greeting = "Hello"
name = "Ram"
greet(name, greeting)

### Options

Hai Ram
Hello Teja
SyntaxError
Hello Ram

### Answer

Hello Ram

I have given MCQ questions you need to pick questions based on the given guidelines
```