From 1d7ff8b8c5ec7f9fc6c89c0f16e1b7878bca38ab Mon Sep 17 00:00:00 2001 From: Harshit Rajput <154085497+HARSHITRAJPUT81@users.noreply.github.com> Date: Wed, 3 Dec 2025 22:23:30 +0530 Subject: [PATCH 1/3] Add initial function.py file --- function.py main | 1 + 1 file changed, 1 insertion(+) create mode 100644 function.py main diff --git a/function.py main b/function.py main new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/function.py main @@ -0,0 +1 @@ + From 1e2084c23acd50111a70c2752976dd11efbc7c80 Mon Sep 17 00:00:00 2001 From: Harshit Rajput <154085497+HARSHITRAJPUT81@users.noreply.github.com> Date: Wed, 3 Dec 2025 22:27:33 +0530 Subject: [PATCH 2/3] Add for loop example iterating over a string --- loops.py main | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 loops.py main diff --git a/loops.py main b/loops.py main new file mode 100644 index 000000000000..bc5eb4e3cdeb --- /dev/null +++ b/loops.py main @@ -0,0 +1,9 @@ +#for Loop in Python +#Iterating over a string + +name = "Abhishek" +for i in name: + print(i) + + if i=="b": + print("This is special word") From 7781d3a149d8e5b5eb097f7b0c8f2ebc5a6c3fff Mon Sep 17 00:00:00 2001 From: Harshit Rajput <154085497+HARSHITRAJPUT81@users.noreply.github.com> Date: Thu, 4 Dec 2025 21:31:51 +0530 Subject: [PATCH 3/3] Create if-else.py main --- if-else.py main | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 if-else.py main diff --git a/if-else.py main b/if-else.py main new file mode 100644 index 000000000000..bee5d1f855b6 --- /dev/null +++ b/if-else.py main @@ -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")