Skip to content

Commit fb2397d

Browse files
Exercise_15
1 parent 622b217 commit fb2397d

File tree

3 files changed

+31
-10
lines changed

3 files changed

+31
-10
lines changed

.idea/workspace.xml

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ Write a Python program which accepts a sequence of comma-separated numbers from
395395
Output :
396396
* List : ['3', ' 5', ' 7', ' 23']
397397
* Tuple : ('3', ' 5', ' 7', ' 23')
398-
**Solution_1:**
398+
**Solution:**
399399
```python
400400
def prog_8():
401401
x = input()
@@ -406,3 +406,18 @@ def prog_8():
406406
prog_8()
407407
```
408408
* * *
409+
410+
## Question_15: ##
411+
**Description:**
412+
Write a Python program to display the first and last colors from the following list
413+
* color_list = ["Red","Green","White" ,"Black"]
414+
415+
**Solution:**
416+
```python
417+
color_list = ["Red","Green","White" ,"Black"]
418+
print(color_list[0])
419+
print(color_list[len(color_list)-1])
420+
```
421+
* * *
422+
423+

Solution.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,5 +301,11 @@ def prog_8():
301301
tuple_ = tuple(x.split(","))
302302
print(list_)
303303
print(tuple_)
304-
prog_8()
304+
# prog_8()
305+
306+
# ========================= Question_13: ===========================================
307+
# Write a Python program to display the first and last colors from the following list
308+
color_list = ["Red","Green","White" ,"Black"]
309+
print(color_list[0])
310+
print(color_list[len(color_list)-1])
305311
print("=============================================")

0 commit comments

Comments
 (0)