Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 8 additions & 1 deletion List : Sum of List Items.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ To write a Python program that calculates the **sum of all elements** in a list.

## 🧾 Program

Add code here
```
L=[153,147,124,102]
print(sum(L)))
```

## Output

<img width="681" height="252" alt="image" src="https://github.com/user-attachments/assets/18f5573e-acb0-4221-b32a-5699c1562507" />


## Result
Thus, the program has been successfully executed.
15 changes: 14 additions & 1 deletion Regex: Filter Words Without the Letter 'e'.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,20 @@ To write a Python program that filters out and returns all elements from a list
5. Print the final filtered list.

## 🧾 Program
Add code here
~~~
import re
l1=[]
items=['goal', 'new', 'user', 'sit', 'eat', 'dinner']
for i in items:
if not re.search(r"e",i):
l1.append(i)
print(l1)
~~~
## Output

<img width="510" height="174" alt="image" src="https://github.com/user-attachments/assets/0d55026c-4507-4d33-89e3-0544638f8213" />


## Result

Thus, the program has been successfully executed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,22 @@ To write a Python program that accepts a string and removes the character at a s
8. Print the final result.

## 💻 Program
Add Code Here
```
def remove(a,n):
for i in range(0,len(a)):
if(i!=n):
print(a[i],end='')
a=input()
n=int(input())
remove(a,n)
```

## Output

<img width="852" height="170" alt="image" src="https://github.com/user-attachments/assets/c082d5bf-b147-4256-afdf-0e205bc86c4e" />


## Result

Thus the program has been successfully executed

17 changes: 16 additions & 1 deletion Strings:Palindrome Check (Without Built-in Functions).md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,23 @@ To write a Python program to check whether the string `"google"` is a **palindro

## 🧾 Program

Add code here
```
string="google"

if string==string[::-1]:

print ("The entered string is palindrome")

else:

print ("The entered string is not palindrome")
```

## Output

<img width="657" height="145" alt="image" src="https://github.com/user-attachments/assets/32e76570-947d-492f-9fda-9319a1ca3b42" />


## Result

Thus the given program is verified and executed sucessfully.
10 changes: 8 additions & 2 deletions Tuple: Check Element Existence.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ To write a Python program that checks if the element `'n'` and the element `8` e
4. Print the results.

## 🧾 Program
Add code here

```
a=eval(input())
print("n" not in a)
print("8" in a)
```
## Output
<img width="916" height="237" alt="image" src="https://github.com/user-attachments/assets/c0fa125f-9e8b-4dc0-97d1-b8230c8aa630" />


## Result
Thus the given program is verified and executed sucessfully