-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5th.py
More file actions
59 lines (49 loc) · 1.17 KB
/
Copy path5th.py
File metadata and controls
59 lines (49 loc) · 1.17 KB
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
# x=int(input('value is '))
# if x%2==0:
# print('even')
# else:
# print('odd')
#grade calculator
# take value from user as a marks between (0-100)
#>= 90--> grade A
#>= 75--> grade B and < 90--> grade B
#>= 60--> grade C and < 75--> grade C
#< 60--> fail
# x=int(input('Enter the marks '))
# if x>=90:
# print('Grade A')
# elif (x>=75) and (x<90):
# print('Grade B')
# elif (x>=60) and (x<75):
# print('Grade C')
# else:
# print('Fail')
#Electricity Bill Calculator
#Units consumed:
#First 100 units 5/unit
#Next 100 units 7/unit
#Above 200 units 10/unit
#Take units as input and print the total bill.
# x=int(input('Unit Consumed '))
# if x<=100:
# print(x*5)
# elif (x<=200) and (x>100):
# print(100*5+x*7)
# else:
# print(100*5+100*7+(x-200)*10)
# Simple Calculator
# Take:
# two numbers
# an operator (+,-,*,/)
# Perform the operation.
# Edge case: Handle division by zero using if
# x=int(input('value is '))
# y=int(input('value is '))
# opp=input('opperator is: ')
# x=10000
# withdrawl=int(input('withdrawl amount '))
# if (withdrawl%100==0) and (withdrawl<=x-500):
# print('withdrawl succesful')
# else:
# print('withdrawl failed')
#