Skip to content

Commit 049fc8d

Browse files
committed
hello added file
1 parent 7bb3fce commit 049fc8d

File tree

9 files changed

+98
-0
lines changed

9 files changed

+98
-0
lines changed

Day-19/Level three/module/file.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def main():
2+
file = open("lco.txt", "w+")
3+
for i in range (20):
4+
file.write("This is python code %d \n" %(i))
5+
file.close()
6+
if __name__=="__main__":
7+
main()

Day-19/Level three/module/harshal.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
def addme (num1,num2):
3+
return num1 + num2
4+
5+
def subme (num1, num2):
6+
return num2 - num1
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# import harshal
2+
3+
# val=harshal.addme (3,6)
4+
# print (val)
5+
6+
from harshal import addme, subme
7+
8+
# or
9+
# from harshal import * # both are equal
10+
11+
print (addme(3,5))
12+
print (subme (4,3))

Day-19/Level three/module/my_dates.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import time
2+
import calendar
3+
import datetime
4+
# print(time.localtime())
5+
6+
# localtime = time.asctime(time.localtime( time.time()))
7+
# print(localtime)
8+
yy = 1947
9+
mm = 8
10+
dd = 15
11+
#print (time.asctime(time.localtime()))
12+
# l=(calendar.month(yy,mm))
13+
# #print (calendar.calendar(yy,mm))
14+
# print (l)
15+
# date_time = date.(yy,mm,dd)
16+
# date_time = date.today()
17+
# print (date_time)
18+
19+
x = datetime.datetime (yy,mm,dd)
20+
print (x.strftime("%A"))

Day-19/Level three/modules.py

Whitespace-only changes.

Day-19/New level/dect-fuct.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# def print (self, *argus, sep='',end = '\n', file=None):
2+
3+
# pass
4+
5+
# own print function ''' function - methods
6+
# def harshal():
7+
8+
# print ("I want to learn python")
9+
# print ("I am doing it")
10+
# return
11+
# harshal()
12+
13+
def greetings( str ):
14+
"fuction docString"
15+
print ("Hello",str)
16+
return
17+
greetings("Amit")

Day-19/New level/math.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import math
2+
print (abs(-45))
3+
print (math.fabs(-45))
4+
print (math.ceil(-45.34))
5+
print (math.ceil(200.12))
6+
7+
print (math.floor(-45.18))
8+
print (math.floor(200.88))
9+
10+
print(math.acos(1))
11+
12+
print(max(20,24,616,44,33))

Day-19/New level/string.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
score = 233
2+
name = "harshal"
3+
4+
print ("hey", name + " my score is ", 233)

lco.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
This is python code 0
2+
This is python code 1
3+
This is python code 2
4+
This is python code 3
5+
This is python code 4
6+
This is python code 5
7+
This is python code 6
8+
This is python code 7
9+
This is python code 8
10+
This is python code 9
11+
This is python code 10
12+
This is python code 11
13+
This is python code 12
14+
This is python code 13
15+
This is python code 14
16+
This is python code 15
17+
This is python code 16
18+
This is python code 17
19+
This is python code 18
20+
This is python code 19

0 commit comments

Comments
 (0)