https://wiki.communitydata.science/api.php?action=feedcontributions&user=Adeizam&feedformat=atomCommunityData - User contributions [en]2024-03-29T13:12:28ZUser contributionsMediaWiki 1.38.4https://wiki.communitydata.science/index.php?title=Statistics_and_Statistical_Programming_(Winter_2017)/List_of_student_git_repositories&diff=88336Statistics and Statistical Programming (Winter 2017)/List of student git repositories2017-01-10T22:00:16Z<p>Adeizam: </p>
<hr />
<div>;Anissa:https://github.com/atanweer/uwcom521-anissa/<br />
;Beth:https://github.com/bbollinger/bbollinger-com521<br />
;Emilia:https://github.com/efran/COM521_EG<br />
;Janny:https://github.com/Jannymomoko/week_02/blob/master/HW-week2.R<br />
;Kevin:https://github.com/kcalderwood87/Kevin-COM-521<br />
;Lauren:https://github.com/finelauren1/com521-lauren<br />
;Luyue:https://github.com/luyema/week_02<br />
;Maggie: https://github.com/maggifes/FES-com521-assignments-week2<br />
;Matthew:https://github.com/adeizam/COM521_Assignments<br />
;Tanya:https://github.com/tfoishi/com521_tanya<br />
;Kyle:https://github.com/kkubler/COM521-Kyle_assignments</div>Adeizamhttps://wiki.communitydata.science/index.php?title=DSCC_mini_workshop_1&diff=83145DSCC mini workshop 12016-04-12T18:23:52Z<p>Adeizam: /* Understanding Lists */</p>
<hr />
<div>Do you have python installed? <br />
If not go here: [[CDSW/Day_0_setup_and_tutorial]].<br />
<br />
<br />
== Understanding Lists ==<br />
You can ['''go here'''][http://greenteapress.com/thinkpython/html/thinkpython011.html] for a quick overview of lists<br />
<br />
- A list is simply a sequence of values e.g [1,2,3,4,5,6]<br />
<br />
- It is often identified through the use of square brackets []<br />
<br />
- A list can contain integers, strings or other lists. There are all lists: [10, 20, 30, 40], ['crunchy frog', 'ram bladder', 'lark vomit'],<br />
['crunchy frog', ['ram bladder', 'lark vomit']]<br />
<br />
== Exercise 1: Python Tutor ==<br />
Python Tutor [http://pythontutor.com pythontutor.com] is a useful educational tool that can help you visualize the execution of your code. <br />
<br />
Click "edit code" to try out your code!<br />
Let's try the Fibonacci sequence! It is a common introductory program. <br />
<br />
l = [0,1]<br />
for i in range(0,10):<br />
l.append(l[-1]+l[-2])<br />
print(l)<br />
<br />
Notice what [-1] and [-2] do. Negative indexing lets you get the elements at the end of a list!<br />
Python Tutor is also useful for understanding how functions work. We will learn how to define our own functions later.<br />
<br />
<br />
== Exercise 2: Assigning Speeches ==<br />
Many Comgrads TA Speech Communication. Imagine you have 30 students in your quiz section. <br />
There are 6 speech assignments in a quarter. Every student gives a speech. <br />
Some students do not like being the first to give their speech and other students do not like going last. <br />
To make things fair we should randomize the order of the speeches and make sure that all students will get a chance to give their speech early or late in order. <br />
<br />
Write a program to generate the list of speech assignments to solve this problem!<br />
<br />
# begin by assigning each student a number 0 .. 29<br />
students = list(range(0,29))<br />
<br />
# use the random module to shuffle the students. <br />
import random<br />
random.shuffle(students)<br />
# this can be our speech order for week 1.<br />
print(students)<br />
<br />
# now that we have randomized the students one time,<br />
# how can we make sure that students don't have to give their speeches first or last more than once per quarter?<br />
# hint: you might try using indexes or slices in a loop</div>Adeizamhttps://wiki.communitydata.science/index.php?title=DSCC_mini_workshop_1&diff=83144DSCC mini workshop 12016-04-12T18:22:13Z<p>Adeizam: /* Understanding Lists */</p>
<hr />
<div>Do you have python installed? <br />
If not go here: [[CDSW/Day_0_setup_and_tutorial]].<br />
<br />
<br />
== Understanding Lists ==<br />
You can ['''go here'''][http://greenteapress.com/thinkpython/html/thinkpython011.html] for a quick overview of lists<br />
<br />
- A list is simply a sequence of values e.g [1,2,3,4,5,6]<br />
<br />
- It is often identified through the use of square brackets []<br />
<br />
- A list can contain integers, strings or other lists. There are all lists: [10, 20, 30, 40], ['crunchy frog', 'ram bladder', 'lark vomit'],<br />
['crunchy frog', ['ram bladder', 'lark vomit']]<br />
-<br />
<br />
== Exercise 1: Python Tutor ==<br />
Python Tutor [http://pythontutor.com pythontutor.com] is a useful educational tool that can help you visualize the execution of your code. <br />
<br />
Click "edit code" to try out your code!<br />
Let's try the Fibonacci sequence! It is a common introductory program. <br />
<br />
l = [0,1]<br />
for i in range(0,10):<br />
l.append(l[-1]+l[-2])<br />
print(l)<br />
<br />
Notice what [-1] and [-2] do. Negative indexing lets you get the elements at the end of a list!<br />
Python Tutor is also useful for understanding how functions work. We will learn how to define our own functions later.<br />
<br />
<br />
== Exercise 2: Assigning Speeches ==<br />
Many Comgrads TA Speech Communication. Imagine you have 30 students in your quiz section. <br />
There are 6 speech assignments in a quarter. Every student gives a speech. <br />
Some students do not like being the first to give their speech and other students do not like going last. <br />
To make things fair we should randomize the order of the speeches and make sure that all students will get a chance to give their speech early or late in order. <br />
<br />
Write a program to generate the list of speech assignments to solve this problem!<br />
<br />
# begin by assigning each student a number 0 .. 29<br />
students = list(range(0,29))<br />
<br />
# use the random module to shuffle the students. <br />
import random<br />
random.shuffle(students)<br />
# this can be our speech order for week 1.<br />
print(students)<br />
<br />
# now that we have randomized the students one time,<br />
# how can we make sure that students don't have to give their speeches first or last more than once per quarter?<br />
# hint: you might try using indexes or slices in a loop</div>Adeizamhttps://wiki.communitydata.science/index.php?title=DSCC_mini_workshop_1&diff=83143DSCC mini workshop 12016-04-12T18:21:40Z<p>Adeizam: </p>
<hr />
<div>Do you have python installed? <br />
If not go here: [[CDSW/Day_0_setup_and_tutorial]].<br />
<br />
<br />
== Understanding Lists ==<br />
You can ['''go here'''][http://greenteapress.com/thinkpython/html/thinkpython011.html] for a quick overview of lists<br />
<br />
- A list is simply a sequence of values e.g [1,2,3,4,5,6]<br />
- It is often identified through the use of square brackets []<br />
- A list can contain integers, strings or other lists. There are all lists: [10, 20, 30, 40], ['crunchy frog', 'ram bladder', 'lark vomit'],<br />
['crunchy frog', ['ram bladder', 'lark vomit']]<br />
- <br />
<br />
<br />
== Exercise 1: Python Tutor ==<br />
Python Tutor [http://pythontutor.com pythontutor.com] is a useful educational tool that can help you visualize the execution of your code. <br />
<br />
Click "edit code" to try out your code!<br />
Let's try the Fibonacci sequence! It is a common introductory program. <br />
<br />
l = [0,1]<br />
for i in range(0,10):<br />
l.append(l[-1]+l[-2])<br />
print(l)<br />
<br />
Notice what [-1] and [-2] do. Negative indexing lets you get the elements at the end of a list!<br />
Python Tutor is also useful for understanding how functions work. We will learn how to define our own functions later.<br />
<br />
<br />
== Exercise 2: Assigning Speeches ==<br />
Many Comgrads TA Speech Communication. Imagine you have 30 students in your quiz section. <br />
There are 6 speech assignments in a quarter. Every student gives a speech. <br />
Some students do not like being the first to give their speech and other students do not like going last. <br />
To make things fair we should randomize the order of the speeches and make sure that all students will get a chance to give their speech early or late in order. <br />
<br />
Write a program to generate the list of speech assignments to solve this problem!<br />
<br />
# begin by assigning each student a number 0 .. 29<br />
students = list(range(0,29))<br />
<br />
# use the random module to shuffle the students. <br />
import random<br />
random.shuffle(students)<br />
# this can be our speech order for week 1.<br />
print(students)<br />
<br />
# now that we have randomized the students one time,<br />
# how can we make sure that students don't have to give their speeches first or last more than once per quarter?<br />
# hint: you might try using indexes or slices in a loop</div>Adeizam