Download presentation
Presentation is loading. Please wait.
Published byLenard Fitzgerald Modified over 6 years ago
2
Feedback Pace Different ideas for delivery Debugging strategies
Sabotage Vocabulary / terminology
3
Feedback Python isn’t scary
4
Python Camp Session 2: Computational Thinking and Problem Solving
Data Types Variables Sequence / Selection / Iteration
5
Dry Run this program age = input(“What is your age? “) double = age + age print(double) Starter - have students guess, then test, then discuss reasons for the error.
6
Solution 1 age = input(“What is your age? “) age = int(age) double = age + age print(double) Starter - have students guess, then test, then discuss reasons for the error.
7
Solution 2 age = int( input(“What is your age? “) ) double = age + age print(double) Starter - have students guess, then test, then discuss reasons for the error.
8
+ - * / ** % Arithmetic Operators num1 = input(”Enter a number: ”)
print(num1 + num2) Find out what each of these does: + - * / ** %
9
Data Types Type Casting Meaning integer int() whole number float
decimal fraction string str() text boolean bool() yes / no true / false Introduce data types and casting. Test out a few times.
10
Data Types a = 3 type(a) a = 3.0 a = “3” a = True
11
Data Types a = 3 type(a) a = 3.0 a = “3” a = True a = 3 type(a)
a = int(“3”) a = “True”
12
Multiple Choice Quiz pi.mwclarkson.co.uk York Python Camp
Programming Resources Programs Python Quiz.py Provide multiple choice quiz. Students adjust question and answer, include some numeric questions (focus on casting), task to duplicate for further questions and add an IF statement to give a grade.
13
a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Assignment A B C
Demonstrate a dry run table and have students work through the assignment quiz
14
a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Assignment A B C
Demonstrate a dry run table and have students work through the assignment quiz
15
a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Assignment A B C 100
Demonstrate a dry run table and have students work through the assignment quiz
16
a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Assignment A B C 100
Demonstrate a dry run table and have students work through the assignment quiz
17
a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Assignment A B C 100 200
Demonstrate a dry run table and have students work through the assignment quiz
18
a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Assignment A B C 100 200
Demonstrate a dry run table and have students work through the assignment quiz
19
a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Assignment A B C 100 200
300 a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Demonstrate a dry run table and have students work through the assignment quiz
20
a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Assignment A B C 100 200
300 a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Demonstrate a dry run table and have students work through the assignment quiz
21
a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Assignment A B C 100 200
300 150 a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Demonstrate a dry run table and have students work through the assignment quiz
22
a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Assignment A B C 100 200
300 150 a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Demonstrate a dry run table and have students work through the assignment quiz
23
a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Assignment A B C 100 200
300 151 150 a = 100 b = 200 c = a + b b = c ÷ 2 a = b + 1 Demonstrate a dry run table and have students work through the assignment quiz
24
Assignment File Exa.im/stempy16.files
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.