TeachingAssistant Soha Makady

From wiki.ucalgary.ca
Revision as of 05:10, 5 October 2009 by Smakady (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

TA: Soha Makady

  • Email: shmmakad@ucalgary.ca
  • CT Hours: Friday 11:00 am to 1:00 pm
  • Office hours: Just send me an email
  • TEXT

File:Mineeee.xls PhDStandsFor.pdf File:Mine.doc File:Mine.xls [1]

Group Project

Group1: Google Earth: Benefits versus Privacy

Goooglaaaa here

Design Skills

Note: All of the design skills material is based on the wiki course material through this link

Problem Solving - Jython Programming Language For a description of the JES Environment, please check the course material through this link.

  • Week 1
    • Task: Printing some text through the interactive window (The black area at the bottom)
print "Hello World!"
->Will print 
print "Hello" + "World"
print "Sum = " , 7
print "4" + "4"
->Will print 44
print 4 + 4
->Will print 8
    • Task: Use arithmetic operators
print 5 + 3
->8
print 5/3
->1
print 5.0 + 3.0
->8/.0
print 5+3/2+7*2
->20
print 5+(3/(2+7))*2
->5
    • Task: For loops
 #Loops through the list having the numbers 1, 3, 6, and 9, and calculates and prints their sum
 def looping():
  sum = 0
  for x in [1, 3, 6, 9]:
   print "Sum = "
   print sum
   sum = sum + x
 
 #Loops through the numbers from 6 to 16 and calculates their sum
 def looping2():
  for x in range(6,16):
   print x/2.0
 #Loops through the list parameter and sums the list and returns the summation
 def sumList(aList):
   sum = 0
   for x in aList:
    sum = sum + x
   return sum
 #Note that you can try this function from the interactive area as follows:
 myList = [1,3,45,90]
 result = sumList(myList)
 print "result = " , result
    • Task: If statement
 #Defines a function that checks whether x is less than or greater than zero
 def Try_if(x):
  if x< 0:
   print x, "is less than zero"
  else:
   print x, "is not less than zero"
 #Defines a function that checks whether the day is a sunny/rainy day
 def Try_if_else():
  weather = 'sunny'
  if weather == 'sunny':
    print "Nice weather"
  elif weather == 'raining':
    print "Bad weather"
  else:
   print "Uncertain, don't plan anything"
    • Problem Solving review

Media: JES_Review_Questions.doc


Take Home: Assignment 1

  • You can find the assignment here
  • A useful example explaining the introduction/model/data/dashboard sections can be found here
  • Please note that there are no CT hours during the reading week. If you have questions, just send me an email, or we can schedule a meeting as needed.


Databases - Access

  • Week 1 - Lab 1:

Introduced the basic parts of an access database: table, query, form, and report. Used the course material through this link


  • Week 2 - Lab1:

This sheet gives examples on:

  • Creating tables: Student table, and Books table
  • Creating a relationship between students table, and Books table. To view/create a relationship, go to "Database Tools", and click on the button "Relationships"

You will find various examples on creating queries as follows:

    • query1_allTablesData: Lists all information from the students table, and the BorrowedBooks table
    • query2_StudentBooks: From the students and BorrowedBooks tables
      • lists: Student name, Bookname, loan duration, and department.
      • Modifies the query to list information for students named "Soha" OR from the "CS" department
    • query3_Group_By_Department: From the students and BorrowedBooks tables:
      • Creates an aggregate query (Group by) to count the number of students coming from every department.
    • query4_LisBooksInfo: From the BorrowedBooks tables:
      • Lists a book's id, name, and author
    • query5_ListBookBorrowals: Lists all the information in the BorrowedBooks table

Media: Soha_Week2_lab1.mdb


  • Week 2 - Lab 2:

Introduced the If statement, custom calculation and crosstab query: Used the example for TA Kambiz, found here


  • Week 3 - Access Review:

Note Please note that this access review covers *some* of the skill set. Please check the complete list of skills for the exam through this link

1. Create a table called: Publishers having these fields: PublishersID, pub_name, city, state, country. Set the types appropriately.

2. Make the default value for the country "Canada".

3. Create the table BookTitles having the following fields: PublishersID, TitlesID, title_name, type, price, sales, quantity. Set the types appropriately.

4. Set the default value for available quantity to 0.

5. Fill in the following for the Publishers table:

 PublishersID	pub_name	city	state	country
 1		BooksForYouth	Edmonton AB 	Canada
 2		DummyBooks	Calgary	 AB	Canada

6. Fill in the following for the bookTitles table:

 PublishersID	TitlesID	title_name		type		price	sales
 1		T01		Mathematics made easy!	Science		21.99	566
 1		T04		SE			Science		12.99	13001
 2		T05		Stress	                psychology	6.95	201440
 2		T06		Ducks are waiting!	psychology	19.95	11320

7. Create a query1 that lists all books for publisher 1 only.

8. Create a query2 that groups by publisher to sum the sales.

9. Create a query3 that modifies query2 to sum the sales for "DummyBooks" publisher only.

10. Create a new query that selects a books title, and its type, and concatenates them into a new field called book info. For instance, for the book titled "Stress", the book info field should be "Psychology: Stress".

Media: T21_Access_Review.mdb


Spreadsheeets

  • Week 1 and week 2:

This sheet gives examples on:

    • Calculations
    • If statement simple and nested
    • Lookup for fixed values, and within a range
    • Vlookup
    • Charts
    • Pivot tables

Note that there are several sheets in the Excel file, where each sheet covers one of the mentioned topics. In every sheet, an example is given with its tasks

Media: Soha_weeks_1_2.xls

Files Media: Questions.doc