Python Day 26 : Nested Logic | HackerRank 30 Days of Code Solutions


 Code:

# Enter your code here. Read input from STDIN. Print output to STDOUT
returned_date = list(map(int,input().split(' ')))
expected_date = list(map(int,input().split(' ')))

fine = 0

if returned_date[2] > expected_date[2]:
    fine = 10000
elif returned_date[2] == expected_date[2]:
    if returned_date[1] > expected_date[1]:
        fine = (returned_date[1] - expected_date[1])*500
    elif returned_date[1] == expected_date[1]:
        if returned_date[0] > expected_date[0]:
            fine = (returned_date[0] - expected_date[0])*15
    
print(fine)

AJ Blogs

Hello everyone, My name Arth and I like to write about what I learn. Follow My Website - https://sites.google.com/view/aj-blogs/home

Post a Comment

Previous Post Next Post
Best Programming Books

Facebook

AJ Facebook
Checkout Our Facebook Page
AJ Blogs
Checkout Our Instagram Page