Skip to content

Commit

Permalink
main
Browse files Browse the repository at this point in the history
  • Loading branch information
sirisatwika committed Apr 28, 2021
1 parent dd5f67e commit d046725
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions p.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
a = True
b = False
a = a or b
b = a and b
a = a or b
print(a,b)
6 changes: 6 additions & 0 deletions unsolved_27thApril/firstcharChange.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def firstchar_Change(string):
char = string[0]
string = string.replace(char, '$')
string = char + string[1:]
return string
print(change_char(input()))
9 changes: 9 additions & 0 deletions unsolved_27thApril/firstrepatedChar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def firstrepeatedChar(str):
h = {}
for ch in str:
if ch in h:
return ch
else:
h[ch] = 1
return "No repated character"
print(firstRepeatedChar(input("Enter a string : ")))
5 changes: 5 additions & 0 deletions unsolved_27thApril/remove_nth_indexChar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def remove_nth(string, n):
a = string[:n]
b = string[n+1:]
return a + b
print(remove_nth(input("Enter the string : "), int(input("Enter the index : "))))

0 comments on commit d046725

Please sign in to comment.