Answer:
following are the program to the given question:
Program:
x = 0#defining an integer variable that holds a value
if x < 0:#defining if that checks x less than 0
print("This number ", x, " is negative.")#print value with the message
else:#defining else block
if x > 0:#defining if that checks x value greater than 0
print(x, " is positive")#print value with message
else:#defining else block
print(x, " is 0")#print value with message
if x < 0:#defining another if that checks x less than 0
print("This number ", x, " is negative.")
elif (x > 0):#defining elif block that check x value greater than 0
print(x, " is positive")#print value with message
else:#defining else block
print(x, " is 0")#print value with message
Output:
Please find the attachment file.
Step-by-step explanation:
In this code, an x variable is defined which holds a value that is "0", in the next step nested conditional statement has used that checks the x variable value and uses the print method that compares the value and prints its value with the message.
In another conditional statement, it uses if that checks x value less than 0 and print value with the negative message.
In the elif block, it checks x value that is greater than 0 and prints the value with the positive message, and in the else block it will print the message that is 0.