Skip to content

Commit

Permalink
recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshlinux committed May 15, 2018
1 parent 6125aa0 commit 487275a
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ChangeDateCSVFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
# print(line2)
ws.write(i,0,line[0])
ws.write(i,1,line[1])
ws.write(i,2,line[2])
ws.write(i,3,line[3])
ws.write(i,2,line[2])
ws.write(i,4,line[4])
ws.write(i,5,line3)
i= i+1
Expand Down
Binary file not shown.
12 changes: 12 additions & 0 deletions Tuples/t1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

a =(1,2,3,4,5,6,7,8)
b = (1,2)
c= a+b

# ANOTHER WAY TO create a tuple
d = 1,2,3,4,5,6

print(c)
print(d)
print(type(d))
print(type(c))
7 changes: 7 additions & 0 deletions add.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
a=10
b =20
a= a+2
b = b-20
c= a+b
a= c-30
print(a)
2 changes: 1 addition & 1 deletion even_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def even_numbers():
if x<=327:
break
if x%2==0:
print x
print(x)


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion factorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#-------------------------------------------------------------------------------
#! python3
fact=1
n = 10
n = int(input("Enter any integer no : "))
for i in range(1,n+1):
fact = fact*i
print ("Factoril of" + str(n) +" is :" + str(fact))
7 changes: 7 additions & 0 deletions sum_digit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
a = int(input("Enter any number :"))
sum =0
while (a!=0):
rem = a%10
sum = sum + rem
a = int(a / 10)
print( sum )

0 comments on commit 487275a

Please sign in to comment.