Rto List |Programming_info || python_problem_21

 RTO is the place where the new bikes and cars are registered but they have a limitation like, they have to register only m number of vehicles per day. So if there are any vehicle more than that, they’ll be sent back asking to come back tomorrow. So write a program to display the number of vehicles registered with the all the details regarding vehicles and help them get all the details of the day in on single sheet.

                                                                    
Input format:
Input will contain two integers.
The First corresponds to number of vehicals for registration.
The second Input corresponds to maximum number of vehicals that can be registered in one day
And all the details of the vehicle.


Output format:
The output contains a list of details of all the vehicles registered one after the other.

Sample input :
4
10
KA09MN01
51178964525
258795462
Chandan V
Mysore
KA09MN02
51178964525
258795462
Chandru V
Mysore
KA09MN03
51178964525
258795462
Chandini V
Mysore
KA09MN04
51178964525
258795462
Chandana A
Mysore
 

Sample output:
Reg.no: chassis no: engine no: owner name: address:
KA09MN01 51178964525 258795462 Chandan V Mysore
KA09MN02 51178964525 258795462 Chandru V Mysore
KA09MN03 51178964525 258795462 Chandini V Mysore
KA09MN04 51178964525 258795462 Chandana A Mysore
Solution:
n=int(input())
m=int(input())
l=[]
for i in range(n):
    ls=[]
    reg=input()
    chs=input()
    enf=input()
    onr=input()
    add=input()
    ls.extend((reg,chs,enf,onr,add))
    l.append(ls)
print("Reg. no: chassis no: engine no: owner name: address:")
for i in l:
    print(i[0],i[1],i[2],i[3],i[4])

Share:

No comments:

Post a Comment

Translate

Recommended platforms

  1. codechef
  2. hackerrank
  3. codeforces
  4. leetcode
  5. hackerearth

Popular Posts

programming_info. Powered by Blogger.

Recent Posts

other platforms

  • geeks for geeks
  • w3schools
  • codepen
  • skillshare
  • udemy

Pages

reader support Support