Student Name: _
Student Number: _
Partners Name and Student #: _
Demonstrator's Name: _
PLEASE NOTE:
If ANY of the above information is UNCLEAR or not provided, your grade
will NOT be recorded!
Lab Day (circle):
Lab Week (circle):
Tues aft
Tues night Wed
11/4/2016
Booleans,Import,Namespaces,andifStatements|Coursera
Booleans, Import, Namespaces, and if
Statements
16questions
1
point
1.
Variable courses refers to the value 3. Select the expression(s) that produce True .
courses != 3
3 = courses
3 >= courses
def quiz2(l):
if len(l) < 2:
return 0
else:
i = 0
count = 0
while i < len(l) - 2:
num = l[i] + l[i + 1] + l[i + 2]
if num < 0 and num >= -10:
count = count + 1
i = i + 1
return count
CHM1311A Midterm #1A 2015
Page 1 of 12
LAST NAME: _
FIRST NAME: _
Student Number: _
CHM 1311 A
Midterm #1 A
Fall 2015
Please keep your work covered at all times and keep your eyes on your
own paper! Cheating or any appearance of cheating will result in an
#Divyang Arora
#8713396
#Number 3
'def alarmtimer(ct, hta):
addintime = hta%24
tta = ct + addintime
if tta > 24:
toa = tta - 24
else:
toa = tta
return toa
'
def pay(wage,hours):
'
(Number,Number) -> Number
enter your wage and hours you worked and this wil
Topic 4:
Chemical Kinetics
k = Ae-Ea/RT
Chemical Kinetics
We can use H to tell if a reaction is energetically
possible or not
We can use K to tell if a reaction is product or
reactant favoured.
But this gives us no information on how and how
fast the r
Topic 6:
Thermochemistry
Types of Energy
ENERGY: the capacity to do work or to produce heat.
Sugar + KClO4 CO2 + H2O + heat + light
CHM1311
Thermochemistry
2
Units of Energy
SI Unit for energy is the joule, J:
kg m2
1J = 1
s2
James Joule, 1818-1889
We s
6(a). State whether the following is true or false, and justify your answer.
(i) If A is an invertible matrix and AB = 0 then B = 0.
(ii) The columns of a 4 by 3 matrix are always linearly dependent.
(iii) If A is a 3 by 4 matrix, then the rows of A must
public class Rational cfw_
private int numerator;
private int denominator;
/ constructors
public Rational(int numerator) cfw_
this(numerator, 1);
public Rational(int numerator, int denominator) cfw_
if (denominator < 0) cfw_
denominator = -1 * denominato
/*
* ITI 1121. Introduction to Computing II (Winter 2010). Laboratory 2. <br/>
* ITI 1521. Introduction l'informatique II (Hiver 2010). Laboratory 2.
*/
/*
* This is a utility class. For now, it contains a single method,
* called findAndReplace.
*
* @auth
/
/
/
/
/
Combination.java - a class to store 3 (int) values
Author
: Marcel Turcotte
Created On
: Mon Jan 26 14:08:48 2004
Last Modified By: Marcel Turcotte
Last Modified On: Thu Jan 10 10:19:57 2008
public class Combination cfw_
/ Instance variables.
pr
/
/
/
/
/
DoorLock.java - models a DoorLock ("has a" Combination)
Author
: Marcel Turcotte
Created On
: Mon Jan 26 14:26:19 2004
Last Modified By: Marcel Turcotte
Last Modified On: Thu Jan 10 10:20:47 2008
public class DoorLock cfw_
/ Constant.
public sta
/
/
/
/
/
Test.java - Tests Combination, DoorLock and SecurityAgent
Author
: Marcel Turcotte
Created On
: Mon Jan 26 14:24:07 2004
Last Modified By: Marcel Turcotte
Last Modified On: Thu Jan 10 10:22:16 2008
public class Test cfw_
public static void main(
public class LinkedList<E> cfw_
private static class Node<E> cfw_
private E value;
private Node<E> next;
private Node( E value, Node<E> next ) cfw_
this.value = value;
this.next = next;
private Node<E> head = null;
public void addFirst( E o )
/*
* Stack Abstract Data Type. A Stack is a linear data structure
* following last-in-first-out protocol, i.e. the last element
* that has been added onto the Stack, is the first one to
* be removed.
*
* @author Marcel Turcotte
*/
public interface
public class LinkedList<E> implements List<E> cfw_
private Node<E> head = null;
private int size = 0;
private static class Node<T> cfw_
private T value;
private Node<T> next;
private Node( T value, Node<T> next ) cfw_
this.value = value;
this.ne
ITI 1121. Introduction to Computing II
Marcel Turcotte
[email protected]
Winter 2015 (Last edited: January 13, 2015) PDF
Course Web site
www.eecs.uottawa.ca/turcotte/teaching/iti-1121
Schedule
The first lecture will be held on Monday January 12, 2
6(a). State whether the following is true or false, and justify your answer.
(i) If A is an invertible matrix and AB = 0 then B = 0.
(ii) The columns of a 4 by 3 matrix are always linearly dependent.
(iii) If A is a 3 by 4 matrix, then the rows of A must
11/4/2016
TuplesandDictionaries|Coursera
Tuples and Dictionaries
12questions
1
point
1.
Consider this code:
1
2
3
4
5
>d=cfw_'a':1,'b':2
>#CODEMISSINGHERE
>d
cfw_'a':1,'c':3,'b':2
Write the missing assignment statement that that modies the dictionary as s
GNG 1105: Section C
Engineering Mechanics
Fall 2016
Chapter 2: Statics of Particles
Forces
A force represents the action of one body on another. Whats important:
- point of application
- magnitude
- direction and sense
magnitude
30
point of application
di
GNG 1105: Section C
Engineering Mechanics
Fall 2016
Chapter 4: Equilibrium of Rigid Bodies
In order to properly understand the equilibrium of rigid bodies, it is of the utmost
importance that we draw good FBDs.
Free Body Diagram Summary
1. Choose which ri
GNG 1105: Section C
Engineering Mechanics
Fall 2016
Sample problem 3.2: Determine the moment of the force about B.
+Y
800N
A
+X
60
Fy
A
+Z out of
page
F = 800N
60
Fx
0.16m
160mm
MB
B
B
200mm
M B rA B F rx Fy ry Fx
M B 0.2m 800sin 60 N 0.16m cos 60 N
M B
GNG 1105: Section C
Engineering Mechanics
Fall 2016
Chapter 2: Statics of Particles
Examples, page 53
Find Tensions in cable AB and AC such that the system is in equilibrium
B
C
A
50
30
FBD:
y
TAC
C
TAB
50
A
30
x
75kg
W
Using trigonometry:
W
TAB
W
sin 60
GNG 1105: Section C
Engineering Mechanics
Fall 2016
Chapter 3: Rigid Bodies
F1
F1
Particle
Rigid body
F2
F2
The point of application affects the motion of the object!
Chapter 3: Rigid Bodies
External Forces
FBD:
y
Centre of gravity
F
x
R1
W = weight of th
GNG 1105: Section C
Engineering Mechanics
Fall 2016
Chapter 2: Statics of Particles
Rectangular Components of a Force
y
y
or
F
Fy
F
Fy
x
Fx
x
Fx
Unit Vectors
y
i = x direction
j = y direction
k = z direction
j
x
i
so,
Fx Fx i
thus
F Fx i Fy j
and
Fy Fy j
GNG 1105: Section C
Engineering Mechanics
Fall 2016
Equilibrium Practice Problems
1. Final Exam 2007
(12 points total) The inclined plate shown in the sketch
is supported by two hinges, B and C, attached to a
vertical wall, and by a cable AD which exerts
GNG 1105: Section C
Engineering Mechanics
Fall 2016
Example of Forces in 3D on a Particle
Example of Forces in 3D on a Particle
The forces at A are P, TAB, TAC and TAD. Only TAD is known, thus we have 3 unknowns.
Forces:
PPj
Example of Forces in 3D on a P
def seconds_difference(time_1, time_2):
" (number, number) -> number
Return the number of seconds later that a time in seconds
time_2 is than a time in seconds time_1."
time_2 = time_2 - time_1
return(time_2)
def hours_difference(time_1, time_2):
" (numbe