Computer Science, asked by ajinkyashelke683, 4 months ago

12
18
24
30
Find output:
a=200
if a>50:
print("Greater than 50")
if a<40:
print("Less than 40")
if a==200:
print("200")
36
42
48
54​

Answers

Answered by jahanvi567
0

We recall the definition of a program in computer

Program is a procedure for solving computer problem

Given:

a=200

Hence it will print "Greater than 50" and then "200"

Answered by BrainlyYoda
3

The output will be

Greater than 50

200

Let's correct the question

Find output:

a = 200

if a > 50:

   print("Greater than 50")

if a < 40:

   print("Less than 40")

if a == 200:

   print("200")

Explanation

A variable a is defined and assigned a value which is 200

Now, the value of a which is 200 is checked in first if condition and it comes out to be true as 200 is greater than 50 so, it prints the statement present in print() which is Greater than 50

Now it checked for the second if condition and it comes out to be false as the value of a which is 200 is not smaller than 40 and it skips the print() as the condition is not satisfied.

Lastly, it checked for the third if condition and it comes out to be true as the value of a which is 200 is equal to 200 so, it prints the statement present in print() which is 200

Extra Information

Python was created by Guido van Rossum and came into existence in 1991. It is a high-level and general programming language. It is a very lucid programming language as it has a good language construct and object-oriented approach. It is dynamically typed and garbage-collected.

Similar questions