Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Basics/Hindi/4_user_input/4_user_input.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#User given Input n1
n1=input("Enter first number")
#User given Input n2
n2=input("Enter second number")
#Type casting string to float, sum of two input n1+ n2
sum=float(n1)+float(n2)
print("Sum is:",sum)
#Output of the Calculation or show the Answer
print("Sum is:",sum)
3 changes: 2 additions & 1 deletion Multiprocessing/multthreading_introduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ def calc_square(numbers):
print("calculate square numbers")
for n in numbers:
time.sleep(1)
#time, sleep function is used to add delay in the execution of a program.
print('square:',n*n)

def calc_cube(numbers):
Expand All @@ -14,7 +15,7 @@ def calc_cube(numbers):
print('cube:',n*n*n)

arr = [2,3,8,9]

#time.time() returns the time as a floating point number expressed in seconds since the epoch, in UTC.
t = time.time()

t1= threading.Thread(target=calc_square, args=(arr,))
Expand Down