[Type C] Python Revision Tour-1 – Chapter 1

|

Computer Science with Python by Sumita Arora Solutions PDF: is what you might have searched for. This is Unit 1 namely Python Revision tour for class 12. Follow along for Sumita Arora Class 12 Python Solutions. You can print the page as PDF for future reference. Type C Questions from the book are covered.

Table of Contents

1. Write a program to print one of the words negative, zero, or positive, according to whether variable x is less than 0, 0, or greater than 0 respectively.

x = float(input("Enter a number: "))

if x < 0:
    print("Negative")
elif x == 0:
    print("Zero")
else:
    print("Positive")
Output
Enter a number: 5
Positive
"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *