Completed

Class 12 IP – Series & DataFrame

Class 12 · Informatics Practices Sun, 27 Sep 2026 8:00 PM 60s / question 15 questions · 15 marks

Questions From This Challenge

Q1mcq1 mark
What will be the output? import pandas as pd s = pd.Series([10, 20, 30, 40], index=['A', 'B', 'C', 'D']) print(s[['D', 'B']] + 5)
D 45, B 25 ✓
B 25, D 45
D 40, B 20
0 45, 1 25
Q2output1 mark
What will be the output?
import pandas as pd
s = pd.Series([5, 10, 15, 20, 25])
print(s[1:4] * 2)
Correct output: 1 20 2 30 3 40 dtype: int64
Q3mcq1 mark
What will be the output? import pandas as pd s = pd.Series({'A': 10, 'B': 20, 'C': 30, 'D': 40}) print(s[['A', 'C']] + s[['C', 'D']])
A NaN, C 60.0, D NaN ✓
A 10.0, C 60.0, D 40.0
A 20.0, C 60.0, D 80.0
C 60.0
Q4mcq1 mark
What will be the output? import pandas as pd s = pd.Series([10, 20, 30, 40, 50, 60]) print(s.head(4).tail(2))
0 10, 1 20
2 30, 3 40 ✓
3 40, 4 50
4 50, 5 60
Q5output1 mark
What will be the output?
import pandas as pd
s = pd.Series(5, index=['X', 'Y', 'Z'])
s['Y'] = s['X'] + 7
print(s)
Correct output: X 5 Y 12 Z 5 dtype: int64
Q6mcq1 mark
What will be the output? import pandas as pd df = pd.DataFrame({ 'Name': ['A', 'B', 'C', 'D'], 'Marks': [72, 88, 65, 91], 'Age': [16, 17, 16, 17] }) print(df[df['Marks'] > 70]['Name'])
0 A, 1 B, 3 D ✓
0 72, 1 88, 3 91
A B D
1 B, 2 C, 3 D
Q7output1 mark
What will be the output?
import pandas as pd
df = pd.DataFrame({
    'A': [10, 20, 30, 40],
    'B': [5, 15, 25, 35]
})
df['C'] = df['A'] - df['B']
df['B'] = df['C'] + 10
print(df)
Correct output: A B C 0 10 15 5 1 20 15 5 2 30 15 5 3 40 15 5
Q8mcq1 mark
What will be the output? import pandas as pd df = pd.DataFrame({ 'Name': ['A', 'B', 'C'], 'Marks': [70, 85, 90], 'Age': [16, 17, 16] }) df = df.drop(columns=['Age']) df.rename(columns={'Marks': 'Score'}, inplace=True) print(df)
Name Marks: A 70, B 85, C 90
Name Score: A 70, B 85, C 90 ✓
Score Name: 70 A, 85 B, 90 C
Name Age: A 16, B 17, C 16
Q9output1 mark
What will be the output?
import pandas as pd
df = pd.DataFrame({
    'Name': ['A', 'B', 'C', 'D'],
    'Marks': [60, 80, 75, 90]
})
x = df[df['Marks'] >= 75]
print(x.head(2))
Correct output: Name Marks 1 B 80 2 C 75
Q10output1 mark
What will be the output?
import pandas as pd
df = pd.DataFrame({
    'A': [10, 20, 30],
    'B': [40, 50, 60]
})
df['C'] = df['A'] + df['B']
df = df[['C', 'A']]
print(df)
Correct output: C A 0 50 10 1 70 20 2 90 30
Q11output1 mark
What will be the output?
import pandas as pd
s = pd.Series([12, 24, 36, 48, 60])
x = s[1:5:2]
print(x)
Correct output: 1 24 3 48 dtype: int64
Q12output1 mark
What will be the output?
import pandas as pd
df = pd.DataFrame({
    'Name': ['A', 'B', 'C', 'D'],
    'Marks': [75, 90, 65, 85]
})
df['Result'] = df['Marks'] >= 70
print(df[df['Result']])
Correct output: Name Marks Result 0 A 75 True 1 B 90 True 3 D 85 True
Q13output1 mark
What will be the output?
import pandas as pd
df = pd.DataFrame({
    'A': [10, 20, 30, 40],
    'B': [1, 2, 3, 4]
})
df['A'] = df['A'] + df['B']
df = df[df['A'] > 25]
print(df)
Correct output: A B 2 33 3 3 44 4
Q14output1 mark
What will be the output?
import pandas as pd
df = pd.DataFrame({
    'Name': ['A', 'B', 'C', 'D'],
    'Marks': [70, 85, 60, 95]
})
df = df[df['Marks'] > 65]
df = df[['Name', 'Marks']]
print(df.tail(2))
Correct output: Name Marks 1 B 85 3 D 95
Q15output1 mark
What will be the output?
import pandas as pd
df = pd.DataFrame({
    'A': [10, 20, 30],
    'B': [40, 50, 60],
    'C': [70, 80, 90]
})
df['B'] = df['A'] + df['C']
df = df[['C', 'B']]
print(df)
Correct output: C B 0 70 80 1 80 100 2 90 120
Next Live Challenge
Network Types
Class 12 · Informatics Practices Fri, 23 Oct 2026, 9:00 PM
View Live Challenges →

← Back to Live Challenge History · Practice MCQs

CodeBuddy
Hi there! 👋 I'm CodeBuddy, your KV Coders assistant.

To help me give you the most accurate answers, please select your class and subject below, or just type your question!
Buddy is typing...