Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create if-else.py main
  • Loading branch information
Harshit Rajput authored Dec 4, 2025
commit 7781d3a149d8e5b5eb097f7b0c8f2ebc5a6c3fff
18 changes: 18 additions & 0 deletions if-else.py main
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
a=int(input("Enter your age: "))
print("your age is:", a)
if (a>18):
print("you can drive")

conditional operators
>, <, >=, <=, ==, !=

print(a>18)
print(a<18)
print(a>=18)
print(a<=18)
print(a==18)
print(a!=18)


else:
print("you can not drive")
Loading