Brian Knapp’s Newsletter

Share this post

[Zero To Python] Day 6 - Journal Entry Input

brianknapp.substack.com

[Zero To Python] Day 6 - Journal Entry Input

One step closer to a working journal

Brian Knapp
Mar 11
1
Share this post

[Zero To Python] Day 6 - Journal Entry Input

brianknapp.substack.com

Yesterday, was a big day. Lots of new ideas came your way. You learned about variables, data structures, and user input. 

Today is an opportunity for you to practice those skills and move forward on our journal application. There isn’t a new concept to cover, so let’s jump straight into the code.

Let’s Get Journal Entry Input

Today we start with a blank slate. Go ahead and delete the previous code and write in this code:

This is the same code as we finished with yesterday. Nothing new, but it is useful to type it back in again.

Next we are going to add a variable and input to capture the journal text. Modify the code to look like this:

As you can see we added a journal_text variable. It gets the user input, but it doesn’t give any particular text prompt like we do with the date input. That is on purpose as it matches the design of our new journal entry screen. 

The output of this program is this:

And that is our code for today.

Assignment

Today’s assignment is to add journal text input to your program. It’s very simple and that is by design. If you want some bonus practice play around with different user inputs and errors you might come across along the way.

Useful Links

- Python input function

Easy Does It

Today was about keeping it easy. Yesterday was a lot of new material, so today is the day to let it soak in and practice a bit.

You made progress today, so great job!

-Brian

P.S. Go here for the full course index → Zero To Python In 30 Days

Share this post

[Zero To Python] Day 6 - Journal Entry Input

brianknapp.substack.com
Comments
TopNewCommunity

No posts

Ready for more?

© 2023 Brian Knapp
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing