KnowledgeBoat Logo

Class - 12 CBSE Computer Science Important Output Questions 2025

  • Python Funda

    Predict the output of the following code fragments:

    x = [1,2,3]
    counter = 0
    while counter < len(x):
        print(x[counter] * '%')
        for y in x:
            print(y * '* ')
        counter += 1
    
    
    View Answer

    29 Likes


  • Python Funda

    Predict the output of the following code fragments:

    for x in 'lamp':
        print(str.upper(x))
    

  • Python Funda

    Predict the output of the following code fragments:

    x = 'one'              
    y = 'two'              
    counter = 0            
    while counter < len(x):
        print(x[counter], y[counter])
        counter += 1
    
    View Answer

    14 Likes


  • Python Funda

    Predict the output of the following code fragments:

    x = "apple, pear, peach"
    y = x.split(", ")
    for z in y :
       print(z)
    
    View Answer

    14 Likes


  • Python Funda

    Predict the output of the following code fragments:

    x ='apple, pear, peach, grapefruit'
    y = x.split(', ')
    for z in y:
        if z < 'm':
            print(str.lower(z))
        else:
            print(str.upper(z))
    
    View Answer

    42 Likes


  • Python Funda

    Which of the following is the correct output for the execution of the following Python statement ?

    print(5 + 3 ** 2 / 2)
    
    1. 32
    2. 8.0
    3. 9.5
    4. 32.0
    View Answer

    10 Likes


  • Python Funda

    How many times will the following for loop execute and what's the output?

    for i in range(-1, 7, -2):
        for j in range (3):
            print(1, j)
    
    View Answer

    67 Likes


  • Python Funda

    How many times will the following for loop execute and what's the output?

    for i in range(1,3,1):
        for j in range(i+1):
            print('*')
    
    View Answer

    27 Likes


  • Python Funda

    Find and write the output of the following python code:

    for Name in ['Jay', 'Riya', 'Tanu', 'Anil'] :
        print (Name)
        if Name[0] == 'T' :
            break
        else :
            print ('Finished!')
    print ('Got it!')
    

  • Python Control Flow

    Write the output of the following:

    for i in '123':
        print("CPU", i)
    

Showing 11 - 20 of 98 Questions