1+ ##############
2+ marks = 55
3+ if marks >= 40 :
4+ print ('You are paseed!' )
5+ else :
6+ print ('You are failed!' )
7+ '''
8+ Output:
9+ You are paseed!
10+ '''
11+
12+
13+ ################
14+ balance = int (input ('Enter your balance: ' ))
15+ if balance < 100 :
16+ print ('You balance is bellow 100' )
17+ elif balance == 100 :
18+ print ('You balance is equal 100' )
19+ else :
20+ print ('You balance is over 100' )
21+
22+ '''
23+ Input:
24+ Enter your balance: 175
25+
26+ Output:
27+ You balance is over 100
28+ '''
29+
30+ ###### Find largest number among three number using nested if-else statement
31+ a , b , c = map (int , input ().split ())
32+ if a >= b :
33+ if a >= c :
34+ print ('Largest number a is ' , a )
35+ else :
36+ print ('Largest number c is ' , c )
37+ else :
38+ if (b >= c ):
39+ print ('Largest number b is %d' % b )
40+ else :
41+ print ('Largest number c is %d' % c )
42+
43+ ##### Find largest number among three number simple if-else statement
44+ a , b , c = map (int , input ().split ())
45+ if a >= b and a >= c :
46+ print ('Largest number a is ' , a )
47+ elif b >= c and b >= a :
48+ print ('Largest number b is %d' % b )
49+ else :
50+ print ('Largest number c is ' , c )
51+
52+ ##### Find largest number among three number python build-in function "max()"
53+ a , b , c = map (int , input ().split ())
54+ mx = max (a , b , c )
55+ print ('Maximum number is ' , mx )
56+ '''
57+ Input:
58+ 1 2 3
59+
60+ Output:
61+ Maximum number is 3
62+ '''
63+
64+ #### Student Grade system using conditional statements
65+ mark = float (input ('Enter your mark of a subject: ' ))
66+ if mark >= 80 and mark <= 100 :
67+ print ('A+' )
68+ elif 70 <= mark < 80 :
69+ print ('A' )
70+ elif 60 <= mark < 70 :
71+ print ('B' )
72+ elif 50 <= mark < 60 :
73+ print ('C' )
74+ else :
75+ print ('Failed' )
76+
77+ '''
78+ Input:
79+ Enter your mark of a subject: 58.75
80+
81+ Output:
82+ C
83+
84+ '''
85+
86+ a = input ('Enter your nationality : ' )
87+
88+ if a .lower () == 'bangladeshi' : # all characters will be lower due to using 'a.lower()'
89+ print ('Yeah! You are Bangladeshi' )
90+ else :
91+ print ('Opps! You are Foreigner' )
92+
93+ '''
94+ Input:
95+ Enter your nationality : BanGlaDeshi
96+
97+ Output:
98+ Yeah! You are Bangladeshi
99+ '''
100+
101+
102+ '''
103+ ** You are now able to solve following online-judge problems.
104+ ------------------------------------------------------------
105+ 1. http://codeforces.com/problemset/problem/4/A
106+ '''
0 commit comments