-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassignment1.6.py
136 lines (94 loc) · 2.91 KB
/
assignment1.6.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# -*- coding: utf-8 -*-
"""
Created on Mon May 27 10:31:25 2019
@author: Shri
"""
#Start writing your code from here
#Populate the variable: interest
#Choice="Yes"
#while(Choice== "Yes" ):
# Number=int(input("Number"))
# if(Number%4==0):
# Sum=Sum+Number
# Choice=input("Do you want to continue? (Enter Yes or No)")
#print(Sum)
#while (t != 0) {
# reverse = reverse * 10;
# reverse = reverse + t%10;
# t = t/10;
#remainder = originalNumber%10;
# result += remainder*remainder*remainder;
# originalNumber /= 10;
#Number=int(input("Number"))
#Sum=0
#Temp=Number
#while(Number!=0):
# Remainder=Number%10
# Sum=Sum+(Remainder*Remainder*Remainder)
# Number=Number/10
#print(Sum)
#if(Temp==Sum):
# print("This is an Armstrong Number")
#else:
# print("This is not an Armstrong Number")
#account = 123345566
#a=1
#for i in str(account):
# if(str(account)[0] == i):
# print(i)
#print(len(str(account)))
#if(str(account)[0] == a):
# print("h")
#print(str(account)[0])
temp=[("b",23),("d",45),("e",56)]
even= lambda data: (data[0],(9/5)*data[1]+32)
a=[1,2,8,9,5,4,3,4,4]
#b=[4,9,5,9,6,9,6,0,7]
#even = list(filter(,(a,b))
print(list(map(even,temp)))
even = lambda a:a%2==0
list2 = list(filter(even,a))
print(list2)
b=[]
#for a in a:
# x=lambda a:a%2==0
# b.append(x)
#print(b)
b = lambda a:a+5
print(b(4))
#Populate the variables: eligible_loan_amount and bank_emi_expected
#Use the below given print statements to display the output, in case of success
#print("Account number:", account_number)
#print("The customer can avail the amount of Rs.", eligible_loan_amount)
#print("Eligible EMIs :", bank_emi_expected)
#print("Requested loan amount:", loan_amount_expected)
#print("Requested EMI's:",customer_emi_expected)
#Use the below given print statements to display the output, in case of invalid data.
#print("Insufficient account balance")
#print("The customer is not eligible for the loan")
#print("Invalid account number")
#print("Invalid loan type or salary")
# Also, do not modify the above print statements for verification to work
#Test your code for different values and observe the results
#calculate_loan(1001,40000,250000,"Car",300000,30)
#> 25000 Car 500000 36
#> 50000 House 6000000 60
#> 75000 Business 7500000 84
# int main()
#{
#int n,r,sum=0,temp;
#printf("enter the number=");
#scanf("%d",&n);
#temp=n;
#while(n>0)
#{
#r=n%10;
#sum=sum+(r*r*r);
#n=n/10;
#}
#if(temp==sum)
#printf("armstrong number ");
#else
#printf("not armstrong number");
#return 0;
#}