For the past two weeks, our cohort has mostly been working on our full-stack projects. When we’re not working on our projects, we’re either in lecture or whiteboarding. Because of the fully remote learning experience, it’s a bit different than the normal whiteboarding, which is typically done in person, on a whiteboard and expo marker, with no technology involved.
For the virtual whiteboarding experience, our cohort is broken up into three random Zoom breakout rooms. The instructor announces the prompt to one student, and the student ‘whiteboards’ on the Google Doc. The prompt I was asked yesterday was:
Write a function that takes in a string and returns True if the string is a pangram.
For context, a pangram is a sentence or verse that contains all the letters of the alphabet. (I had no idea what a pangram was upon being given this prompt!)
Test case that should return True:
The quick brown fox jumps over the lazy dog.
Before typing the code, I asked the instructor a few clarifying questions:
- Does it matter if the letters are lowercase or uppercase? No.
- Can I use a built in method like set() or .lower()? Yes.
One thing I didn’t account for though, was whether the period in the string accounted for a character. I realized this after I wrote the below:
The instructor confirmed that the period isn’t a character, so the above function was close, but not correct. So I redid the function again today to account for the period not counting as a character, this time on paper to get a closer sense of the whiteboarding experience.
Double checking my solution in iPython to confirm it indeed works:
I’m slowly getting used to the whiteboarding experience, and excited to get a lot more practice in!