Wednesday, August 23, 2023

Bus Stop program coding in Python

 INPUT:

source=["udumalpet","coimbatore","palani","madurai","mysore","palakad"]

places={

 

  ("udumalpet","coimbatore"): 100,

  ("palani","madurai"):140,

  ("mysore","palakad"):200

}

a=str(input("Source:"))

if a in source:

  

  b=str(input("Destionation:"))

  if(a,b) in places:

    print("the distance from",a,"to",b,"is",places[(a,b)],"km")

    

  elif(b,a) in places:

    print("the distance from",b,"to",a,"is",places[(a,b)], "km")

  else:

    print("wrong")

    

    

else:

  print("enter correct source")






USD TO INR C++ PROGRAMMING

  NALLAMUTHU GOUNDER MAHALINGAM COLLEGE                                                 POLLACHI-642001                                     ...