Skip to content

Commit ac4d665

Browse files
committed
Merge pull request #18 from Twinters007/master
Python Basics 8 Write Up
2 parents 30e2ce5 + 8b49ceb commit ac4d665

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

065-python-basics-8.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
1-
# 65 - Python Basics 8 (TODO)
1+
# 65 - Python Basics 8
22

3+
*Written by Tim Winters
4+
5+
## Problem
6+
A boolean is a value that is either True or False. Given an list of arrays of integers as `[a,b]` stored in `args`, for each array, if the sum of `a + b <= 25` then concatenate the value "1" to represent the value `True` to a string. Otherwise, concatenate "0" to represent the value `False`.
7+
## Hint
8+
9+
I wonder if there's a built in sort function?
10+
11+
## Solution
12+
Python allows you to store an array as individual values in a for loop.
13+
14+
```Python
15+
x=""
16+
for a,b in args:
17+
if a+b<=25:
18+
x+="1"
19+
else:
20+
x+="0"
21+
print x
22+
```
23+
24+
## Flag
25+
26+
`b0ole4n_l0g1c_011000100110100101101110011000010111001001111001`

0 commit comments

Comments
 (0)