45 minutes sprint
Question
Given the triangle of consecutive odd numbers:
1
3 5
7 9 11
13 15 17 19
21 23 25 27 29
Calculate the row sums of this triangle from the row index (starting at index 1).
Solution should by written in PHP
E.g.
rowSumOddNumbers(1); // 1
rowSumOddNumbers(2); // 3 + 5 = 8
Given a table with the following.
id | name | role_id | |
---|---|---|---|
1 | Jon | [email protected] | 1 |
2 | Peter | [email protected] | 1 |
3 | Stanley | [email protected] | 1 |
1 | Jon | [email protected] | 3 |
1 | peter | [email protected] | 3 |
Write an SQL query that selects distinct emails where role_id is equal to 3 or 1.
Example Result.
[email protected] |
[email protected] |
[email protected] |
Todo list app NB: Focus on functionality not, how good it looks.
- Add Todo
- Remove Todo
- Toggle completed status
- Change todo text
william (I'm not with my laptop right now, so I couldn't use codepen)
Sql
SELECT email from table as answers
WHERE row_I'd = 3 OR row_id = 1
Frontend
https://www.w3schools.com/code/tryit.asp?filename=G0L26L303OFN
PHP
https://repl.it/repls/OpulentHighPrinter