Day 3: How To Begin With Python

  1. I started with the Official Python Tutorial, but found it necessary to “digress” a bit and understand the installation and configuration options.
  2. Having done that, we move to the next section in the tutorial – “Whetting Your Appetite” which is nothing but some introductory comments to warm you up.
  3. The next section is “Using the Python Interpreter”. This recommends taking a peek at “Command line and environment” to know about all the options to run python commands, scripts and modules through the command line.
  4. Section 3 is “An Informal Introduction to Python”. This tells how to use the interpreter /command line like a calculator as well as for text / string manipulation. 4th section takes a dive into “More Control Flow Tools”. 5th is on “Data Structures”. 6th is Modules.  After quickly scanning these, I jump to “13. What Now?“. Frankly, nothing immediately actionable.
  5. I google Project Ideas for Python Beginners. The first link that comes up is ” Five mini programming projects for the Python beginner”.
  6. A cute fun project idea mentioned here is “Mad Libs Generator” (no code). A sample code for the same is found here.

On this page, a sample code suggested by a user Ken Doman is:

# Madlib program
# step 1: request the words
adjective1 = input(“Tell me an adjective, and click enter. “)
noun1 = input(“Tell me a noun (plural), and click enter. “)
noun2 = input(“Tell me another noun, and click enter. “)
adjective2 = input(“Tell me an another adjective, and click enter. “)

# step 2: print the poem
print(“Roses are…er…um…”)
print(“Roses are ” + adjective1)
print(noun1.capitalize() + ” are blue”)
print(noun2.capitalize() + ” is ” + adjective2)
print(“And so are you!”)

Here is an output:

Cheap thrills!

End of Day 3.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s