Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 35e73f6

Browse files
RezwanRezwan
Rezwan
authored and
Rezwan
committed
Modified
1 parent 5a60bf5 commit 35e73f6

File tree

4 files changed

+122
-0
lines changed

4 files changed

+122
-0
lines changed

‎A. Theatre Square.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from math import ceil
2+
n,m,a = map(int,input().split())
3+
A = ceil(n/a)
4+
B = ceil(m/a)
5+
print(int(A*B))

‎A. Watermelon.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
w = int(input())
2+
if w%2 == 0 and w != 2:
3+
print("YES")
4+
else:
5+
print("NO")

‎Conditional Statements.py

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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+
'''

‎Python Variables and Data Types.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@
6161
print(10 > 5) # True
6262
print((5 >= 1) and (5 <= 10)) # True
6363

64+
'''
65+
** You are now able to solve following online-judge problems.
66+
------------------------------------------------------------
67+
1. http://codeforces.com/problemset/problem/1/A
68+
2. http://codeforces.com/problemset/problem/4/A
69+
'''

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /