Day 3, for documentation purposes . . . I now have so many questions swimming around in my head related to how & when I would use programming in the future. But that's another post.
For Day 3, students were introduced to loops. This was a little more difficult for all of us, but the students were still super interested in the process.
Chris gave us these programs to try:
1. Use a loop to write a program that prints all multiples of three from 3-42.
2. Primality testing: Write a program that lets the user input a number and then checks if it is prime.
3. Number of numbers divisible by 3: Write a program that will let the user input a number, and then the program searches for and counts the number of numbers up to that number that are divisible by 3.
4. Product of first n numbers: Write a program that will let the user input a number, and then it will find the value of the product of all the integers up to that number.
5. Averaging test scores: Write a program that asks the user how many test scores they want to average, and then prompts them for each test score and finds the average.
Harder ones:
6. Reducing Radicals: Write a program that can reduce a radical. For example, if the user enters 20, it should return the numbers 2 and 5, representing 2 root 5.
7. Finding perfect numbers: A perfect number is a number that is equal to the sum of its divisors, besides itself. Example: 6 = 1 + 2 + 3. The first 4 perfect numbers were known in antiquity. Write a program that can find all perfect numbers up to a number inputted by the user. You will most likely need nested loops.
These were tough! I did not get through the list of programs today (or past #3).
The activity is still a hit with students. They are seriously begging for more!
Tomorrow they are each going to present one of their original programs.
Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts
Friday, November 8, 2013
Wednesday, November 6, 2013
Programming Part 2
For Day 2 of my introductory adventures in programming, we (I mean Chris, the amazing student teacher) did this:
1. Introduce students to test and logic commands (2nd MATH). We practice writing logic statements and identifying if they were true or false.
1. Introduce students to test and logic commands (2nd MATH). We practice writing logic statements and identifying if they were true or false.
2. Introduce students to "IF" statements. Together we wrote a program that asks the user to input an x and y coordinate, then identify its quadrant.
3. For homework, students worked on these:
*A program that asks the user for 2 numbers, and then displays the larger number.
*A program that asks the user for the center point and radius of a circle, as well as an additional point, and will display whether the point is inside the circle.
*A program that asks the user for A and B from a function in the form Ax^B, as well as an x-coordinate. It then displays the slope of the function at that point.
*A program that asks the user for the slope of 2 lines, and then displays if they are parallel, perpendicular, or neither.
*A program that takes in a number from the user and displays whether it is even or odd. (Hint: use fPart command).
Day 2 was just as much fun as Day 1! A few students have been enamored with the idea of a guessing game program where the computer generates a random value between 1 and 100 and coaches the user's guesses with "too high" or "too low" until the value is found. They've been working on it even though they don't have quite all the tools yet, and some of them are figuring it out.
3. For homework, students worked on these:
*A program that asks the user for 2 numbers, and then displays the larger number.
*A program that asks the user for the center point and radius of a circle, as well as an additional point, and will display whether the point is inside the circle.
*A program that asks the user for A and B from a function in the form Ax^B, as well as an x-coordinate. It then displays the slope of the function at that point.
*A program that asks the user for the slope of 2 lines, and then displays if they are parallel, perpendicular, or neither.
*A program that takes in a number from the user and displays whether it is even or odd. (Hint: use fPart command).
Day 2 was just as much fun as Day 1! A few students have been enamored with the idea of a guessing game program where the computer generates a random value between 1 and 100 and coaches the user's guesses with "too high" or "too low" until the value is found. They've been working on it even though they don't have quite all the tools yet, and some of them are figuring it out.
Tuesday, November 5, 2013
Diving Into Programming!
This post is 100% inspired by Jasmine's TMC13 presentation-turned-blog-post. I thought it was a great idea from the beginning, but I honestly didn't take it very seriously for myself. I guess I just didn't think it would work for me. And I don't teach geometry. I passed Jasmine's post on to our geometry teacher and her student teacher. Chris (student teacher) got really excited about it. The more we talked, the more I started to see the potential for any of the classes I teach.
So, Chris and I decided to join forces and introduce our combined Calculus & Pre-Calculus classes to simple programming. I have almost zero knowledge about programming. So by "join forces", I really mean that he taught the class and I'm over here learning along with the students.
This was sort of a spur-of-the-moment interruption-to-your-regularly-scheduled-math-class-kind-of-activity. We have flexible schedules, so we decided to jump in and try it and I am so glad we did! I am feeling confident about doing this on my own in my other classes now.
I am sure this is all painfully simple to anyone who knows anything about programming, but it was mostly new to me. I wanted to document here for my future self. Maybe someone reading is like me and never thought you could do this sort of thing. You can! If you don't have a stellar student teacher to help you out like I did, just follow these steps.
Day 1 looked like this;
1. Distribute TI-83 calculators. Some kids had them already, we had enough for the rest to borrow.
2. Demonstrate the location of the PRGM button, the NEW tab, name a program, and locate all the commands within the program menu.
3. Demonstrate the ClrHome and Disp commands. Write a program to display the word "HELLO".

4. Demonstrate the Input command. Show students how to store a value, calculate and display a result. Write a program to request someone's age and tell them how old they'll be in 20 years. (I did not like my number).

We also did a pythagorean theorem program together.
5. Send them home with some programs to try:
*Write a program that asks the user for the year they were born, and then displays approximately how many years old they are.
*Write a program that asks the user for 2 x-coordinates and 2 y-coordinates and then finds the distance between the points.


I cannot tell you how much fun this was for me, mostly because I got to learn along with my students. I saw several of them later in the day, and we couldn't put our calculators down. We had to stop and compare distance formula programs. We exchanged calculators and tested each other's programs. Students started coming up with their own ideas for programs and asking me to test them out.
It was a super fun day to be ateacher student.
I am pumped for my next lesson!
Stay tuned for Day 2.
So, Chris and I decided to join forces and introduce our combined Calculus & Pre-Calculus classes to simple programming. I have almost zero knowledge about programming. So by "join forces", I really mean that he taught the class and I'm over here learning along with the students.
This was sort of a spur-of-the-moment interruption-to-your-regularly-scheduled-math-class-kind-of-activity. We have flexible schedules, so we decided to jump in and try it and I am so glad we did! I am feeling confident about doing this on my own in my other classes now.
I am sure this is all painfully simple to anyone who knows anything about programming, but it was mostly new to me. I wanted to document here for my future self. Maybe someone reading is like me and never thought you could do this sort of thing. You can! If you don't have a stellar student teacher to help you out like I did, just follow these steps.
Day 1 looked like this;
1. Distribute TI-83 calculators. Some kids had them already, we had enough for the rest to borrow.
2. Demonstrate the location of the PRGM button, the NEW tab, name a program, and locate all the commands within the program menu.
3. Demonstrate the ClrHome and Disp commands. Write a program to display the word "HELLO".

4. Demonstrate the Input command. Show students how to store a value, calculate and display a result. Write a program to request someone's age and tell them how old they'll be in 20 years. (I did not like my number).

We also did a pythagorean theorem program together.
5. Send them home with some programs to try:
*Write a program that asks the user for the year they were born, and then displays approximately how many years old they are.
*Write a program that asks the user for 2 x-coordinates and 2 y-coordinates and then finds the distance between the points.


It was a super fun day to be a
I am pumped for my next lesson!
Stay tuned for Day 2.
Subscribe to:
Posts (Atom)