Topics
- Tsunami prgramming
- Hardware and Software interrupts
Tsunami programming
The first task being to count the number of events in the same year as the max height event meant adding a few variables to keep track of such data.
The simplest solution for finding the year, in my view, was to add to the same structure that finds the max height.
Then it was a matter of cycling through the data once it has all been attributed from the file.
And printing what I had found.
The second problem was decidedly more gruesome. I started that same by creating a few variables to be used.
Then I used an if statement to find the grim event.
Then it was simple to print what I wanted with some style.
For the third problem I had to find the events with a minimum kills. I first defines the number I was going to have to use with my check.
Then I just cycled though the program at the end and printed the ones that met the minimum number. I did some formatting for it would look nice. I added the year because it seems like relevant information.
Finding The number of hits in July was straightforward as well. I feel I am getting much better at thinking of a program as a searchable thing instead of thinking in terms of directing each event.
Then it was a matter of using a for loop to find those bad boys.
Finding the Peru hits was a little more tricky. After thinking about strings I realized they are an array of individual characters for I for a nested for loop to do it.
I also added the or part so I could find the case differences part.
Hardward and software interrupts
This is a way I can control the speed of something even before I could get interrupt going.
The hardware interrupts was a little more interesting. The button setup also meant we didn't have to debounce the button like we would normally have to.
Hardward and software interrupts
This is a way I can control the speed of something even before I could get interrupt going.
The hardware interrupts was a little more interesting. The button setup also meant we didn't have to debounce the button like we would normally have to.

No comments:
Post a Comment