I2P-Bernard-Day1

Day 1

  1. Screenshots describing what you’ve completed on Codeacademy.

This is what I did on Day 1. Unit 1,2,3 for Python and Unit 1,2 for JS. 

Screen Shot 2016-06-20 at 9.17.32 PM

 

Screen Shot 2016-06-20 at 9.17.37 PM

Screen Shot 2016-06-20 at 9.17.45 PM

Screen Shot 2016-06-20 at 9.19.36 PM

Screen Shot 2016-06-20 at 9.19.40 PM

  1. Describe briefly what you’ve learnt

For Python, I’ve learnt variables, booleans, data types, strings, conditionals, and learned how to code a translator (pyglatin). 

For Javascript, I learnt a lot of similar stuff but one new thing I learned was functions. In the end, I also made a rock, paper, scissors game. 

  1. A few lines of code with comments showing your understanding of the code.

Python: 

if len(original) > 0 and original.isalpha():

word = original.lower()
first = word[0]

 

JS: 

var compare = function(choice1, choice2)
{
if (choice1 === choice2)
{
return “The result is a tie!”;
}
else if (choice1 === “rock”)
{
if (choice2 === “scissors”)
{
return “rock wins”
}
else
{
return “paper wins”

  1. Other resources you came across in this learning process (e.g. a post from a discussion forum, an advice from your friends/classmates).

I used a YouTube video. https://www.youtube.com/watch?v=42MBMSOZgD4 

Daily Challenge:

Rock Paper Scissors Game

Screen Shot 2016-06-20 at 9.31.38 PM

Area of a Circle and Triangle:

Here is the finished product. Fully working.

Screen Shot 2016-06-21 at 5.15.53 PM

One thought on “I2P-Bernard-Day1

  1. Hamlet L says:

    PyCharm is trying to read the input as a string instead of a number.

Leave a Reply