Write a program to print one …
CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Related Questions
Posted by Hanni Pham 1 year, 2 months ago
- 0 answers
Posted by Hanni Pham 1 year, 2 months ago
- 1 answers
Posted by Syedali Fathima 1 year, 3 months ago
- 1 answers
Posted by Prawar Narang 1 year, 4 months ago
- 1 answers
Posted by Priya Shukla 1 year, 3 months ago
- 1 answers
Posted by Kandeepan Jothivel 1 year, 4 months ago
- 2 answers
myCBSEguide
Trusted by 1 Crore+ Students
Test Generator
Create papers online. It's FREE.
CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app
Gaurav Seth 5 years ago
Source Code: Using if...elif...else
num = float(input("Enter a number: "))
if num > 0:
print("Positive number")
elif num == 0:
print("Zero")
else:
print("Negative number")
Source Code: Using Nested if
num = float(input("Enter a number: "))
if num >= 0:
if num == 0:
print("Zero")
else:
print("Positive number")
else:
print("Negative number")
1Thank You