# Most recents (4)

Hi Reader, I hope you are having a good day and will have a great life from now on.

Day 8 of #100DaysOfCode.

Python
Type 2 of itertools
remember you have to import them using
from itertools import name_of_itertool
1)takewhile
Take values from iterable while the predicate function remains true,once predicate function returns false it will no
longer take values.
example:
lis=[2,4,1,8,6,14]
lis_even=list(takewhile(lambda x:x % 2 == 0,lis))
returns lis_even=[2,4]
2)accumulate
Returns a running total of values in iterable.
lis=[0,1,2,3]
lis_new=list(accumulate(lis))
returns lis_new=[0,1,3,6]
Hi Reader, I hope you are having a good day and will have a great life from now on.

Day 7 of #100DaysOfCode.

Python
1)Recursive Functions:
Every recursive function has a base case that stops it from going into the fourth dimension(that's what I like to think ðŸ˜…).
Example 1:
Recursive functions can be implemented with more than one function. Here's an example for checking even and odd numbers
Example 2:
#100daysoflearning #psychology
Day 18 update
Started another reading from chapter 2 of Mayerâ€™s book on Social Psychology, completed 5 pages
#100daysoflearning #psychology
Day 18 update
Key Learning
- spotlight effect is experienced when we think people are paying more attention to us then needed.
- we also suffer from illusion of transparency that our emotions are easily detectable.
#100daysoflearning #psychology
Day 19-20 update
Completed up to page 12/chapter 2 from Social psychology book by Mayers
Key Learning
- We overestimate the visibility of our social blunders and public mental slipups
- At center of our world is our sense of self
#100DaysofLearning #psychology
I decided to learn #psychology for next 100 days.
First day update
Learnt basics of social psychology and some big ideas.
Picture from Social psychology book by Mayerâ€™s
Started with @coursera course on Social Psychology by Scott Plous @wesleyan_u
#100daysoflearning #psychology
Day 2 update.
Finished reading chapter 1 of book
Social psychology by Mayers.
Life is lived foreword but understood backwards