Skip to content

Commit 01a9217

Browse files
Exercise_10 description
1 parent 178c713 commit 01a9217

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ Notes: Assume the data is input by console.\
257257
**Hints:**
258258
In case of input data being supplied to the question, it should be assumed to be a console input.
259259

260+
**Solution_1:**
260261
```python
261262
def prog_5():
262263
x = input().split(",")
@@ -268,4 +269,32 @@ def prog_5():
268269
print(list_2)
269270
prog_5()
270271
```
272+
273+
**Solution_2**
274+
```python
275+
value = []
276+
items=[x for x in raw_input().split(',')]
277+
for p in items:
278+
intp = int(p, 2)
279+
if not intp%5:
280+
value.append(p)
281+
282+
print ','.join(value)
283+
```
284+
* * *
285+
* * *
286+
287+
## Question_10: ##
288+
**Description:**
289+
290+
Write a program, which will find all such numbers between 1000 and 3000 (both included) such that\
291+
each digit of the number is an even number.\
292+
The numbers obtained should be printed in a comma-separated sequence on a single line.\
293+
294+
**Hints:**
295+
In case of input data being supplied to the question, it should be assumed to be a console input.
296+
297+
```python
298+
code
299+
```
271300
* * *

0 commit comments

Comments
 (0)