lesson_10_ex_1_17_18

# -*- coding: utf-8 -*-
"""
Created on Mon May 14 18:06:40 2018

@author: stkarlos
"""

def hotel(days, cost , tax , dnt = 'Yes'):
    if type(days) != int or type(cost) != float or type(tax) != int or type(dnt) != str:
        return 0
    elif dnt == 'Yes':
        x = days * cost * (tax/100. + 1)
    else:
        x = days * cost
    return x



print hotel(3,15,10,'No')


r = 'n'
l = []
while r != 'y':

    a = int(raw_input('dose imeres: '))
    b = float(raw_input('dose xreosi ana imera: '))
    c = int(raw_input('dose foro: '))
    d = raw_input('xreonesai me foro: ')
    l.append(hotel(a,b,c,d)) 


    r = raw_input('stop? [y/n]')
    
print l , max(l)

 

Posted in Uncategorized