Thursday, 8 July 2021

Time and Work - Problem 1

 1. A can do a work in 15 days and B in 20 days. If they work on it together for 4 days, then the fraction of the work that is left is?


A.
1
4
B.
1
10
C.
7
15
D.
8
15

A work in 15 days A 1 day work is 1/15


B work in 20 days B 1 day work is 1/20


Both will work together in 1/15+1/20 = 7/60


They worked in 4 days 7/60*4 = 7/15 of work will completed in 4 days.


Work remaining is 1-7/15 = 8/15.



Python Code:


print("A can do work in How many days")


a=int(input())


print("B can do work in How many days")


b=int(input())


c=1/a


d=1/b


e=c+d

f=4*e;

g=1-f


print("Solution for the answer is")

print(g)








No comments:

Post a Comment