How To Code

Who We Are

Girls Who Code is a group for girls that are interested in coding. We learn how to use different programs and how to use code in different ways. We learn how to create functional games like tic-tac-toe and rock paper scissors. Each day of GWC we learn about women or a woman in tech. We have also used different platforms like salesforce. Our goal is to let everyone learn something new about coding each day and to use that skill for as long as we can.

Variables

A variable is something that stores data in a code. So that you don't need to write the same code over and over again. They also use variables in science, sooooooo if you like science and know science thennnn, stop reading its all repetion. For more on variables, visit http://whatis.techtarget.com/definition/variable

Conditionals

Did you know there is a such thing as an conditional verb? What, you don't know about conditionals!?!?! Well, I didn't either until I read about Casio. Casio created a lot of codes using conditionals that help us today. there is a link in the bottom of the page to see the home page of the website. Casio is more than one person, it's a company, June 1957 (as Casio Computer Co., Ltd.) Casio Computer Co., Ltd. (カシオ計算機株式会社 Kashio Keisanki Kabushiki-gaisha) is a Japanese multinational consumer electronics and commercial electronics manufacturing company headquartered in Shibuya, Tokyo, Japan.

Conditionals with cards look similar to this:
If (CARD is lower than 5)
If ( CARD is BLACK)
Award YOUR team the same number of points on the card
Else
Award OTHER team 1 point
Else
If (CARD is HEARTS)

These are the basics of conditionals. I recommend doing your own research. Another example is on this Wikipedia link

If (boolean condition) Then
(consequent)
Else
(alternative)
End If
Sooooo thats all for conditional basics :)

Rock, Paper, Scissors is a game we programmed that uses conditionals to determine who wins. You can try it out here.

Loops

The earliest loop was created by Joseph Marie Jacquard. The early loops were created on cards with specific holes punched on the sides. The way to read these loops is on a loom. This type of loom "controls the pattern of longitudinal warp threads depressed before each sideways passage of the shuttle." "Jacquard's invention allowed patterns to be woven without the intervention of the weaver. At first Jacquard's looms were destroyed by weavers who feared unemployment. The French government took over the invention and Jacquard was given a royalty on every loom sold. By 1812 there were 11,000 Jacquard looms working in France, and they were also beginning to appear in other countries. The growth of the use of the Jacquard loom in the 1820s gave the textile industry a tremendous boost in Britain. By 1833 there were about 100,000 power-looms being used in this country that had been influenced by Jacquard's invention."

We learned that loops can make it easy to repeat actions. There are two types of loops. FOR loops are for when there is a specific number of times (or length of time) to repeat the action (like brush your teeth for 2 minutes). WHILE loops are for repeating actions until a condition changes (like read the book while there are still pages with writing). We learned you can nest loops inside one another. For programming examples we created using loops, check out our Loops Page.

Functions

This is where the paragraph about functions goes. I should answer the following items: A function is storing data in a code. "They combine many instructions into a single line of code. Most programming languages provide many built in functions that would otherwise require many steps to accomplish." This quote is from https://www.cs.utah.edu/~germain/PPS/Topics/functions.html. Most functions have an input and an output.

We learned that some songs can be thought of as functions. For example we could declare a function for the song Old McDonald:

```    Function Old McDonald (animal, sound) as {
Old McDonald had a farm EIEIO
On that farm he had a "animal" EIEIO
With a "sound" "sound" here
And a "sound" "sound" there
Here a "sound", there a "sound"
Every where a "sound" "sound"
Old McDonald had a farm EIEIO  }```

We can then call multiple verses like:

```    Old McDonald (cow, moo)
Old McDonald (horse, neigh)
Old McDonald (duck, quack)
Old McDonald (pig, oink)```

Games

Check out these games we made while learning to code.