No products in the cart.

def calcresult(): i=9 while i>1: if(i%2==0): …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

def calcresult(): i=9 while i>1: if(i%2==0): x=i%2 i=i-1 else: i=i-2 x=i print x**2
  • 3 answers

Gaurav Seth 4 years, 1 month ago

def calcresult(): 
    i = 9 
    while i > 1: 
    if (i % 2 == 0): 
        x = i % 2 
        i = i - 1 
    else: 
        i = i - 2 
        x = i 
    print x * *2 

Ans:

Output:

<pre> 49 25 9 1 </pre>

Aastha Singh 4 years, 1 month ago

The indentation is not correct it is missing some spaces but as a python programmer you can understand

Aastha Singh 4 years, 1 month ago

Please find the output it is very important
http://mycbseguide.com/examin8/

Related Questions

What are called tokens
  • 2 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App