February 20, 2018, 07:09:33 AM
Welcome, Guest. Please login or register.

There are two rules for success: #1 Never Tell Everything You Know.

Author Topic: Python for noobs #lab 1  (Read 1774 times)

Offline Guy with 6 Magikarps

  • Prospect
  • *
  • Posts: 29
  • Internets: +7/-0
  • @Ihave6magikarps [Twitter]
Python for noobs #lab 1
« on: April 09, 2014, 09:54:22 AM »
    Hello THS, this forum has given so much to me, so I want to give back and give a little intro to Python 3.+.    
  This is for everyone out there.
    We will be using Python 3.+. Here is the URL https://www.python.org/downloads/
  My Idle of choice Ninja IDLE http://ninja-ide.org/
    Here is a good book I found in issuu.com
Part one of two
Part two of two

 Read sections 2.1-2.6 and Chapter 1, but first 2.1-2.6.
    Download the following program: Hello.py
        To download a .py file, RIGHT-click on the link, choose "Save Target As..." or "Save Link As...", and then save the file in your Work folder.
    Open the program up in IDLE (RIGHT-click on the file icon or file name and select "Edit with IDLE").
    Look over the source code and run the program to understand the syntax and flow of execution.
        To run it, first make sure that the window containing the program is selected.
        Then either go to the Run menu and choose Run Module, or use the hot key F5 (NinjaIdle is F6).
    Next, modify the program so that it asks the user 3 more questions. These can be any questions you like. Some examples are:
Code: [Select]
"What type of car do you like?" or
Code: [Select]
"What is your I.P.?"     
    For each question, have the program display the user input with some string literal. An example might be "You are studying" followed by the input to the first question above.
  For example, the input section might contain three questions, with each answer stored in a variable.  Then the output section may show three sentences.*
    REMINDER: Save your .py file only by using the "Save" command on the File Menu in the Editor Window (the window that shows your Python source code).  Do not use the "Save" command in the Shell Window; it might cause you to lose your program.

Sample program of string expressions:

    operators with strings

A more effective way to print a "sentence", allows you to more easily control spacing between different elements. Dissect it carefully!
Did you read the book? Test yourself. You will need paper and pen to trully test yourself

-- Chapter 1 Vocab

Online quiz
« Last Edit: April 10, 2014, 06:17:02 PM by Guy with 6 Magikarps »
When I'm in command every mission's a suicide mission.

Offline r3k0hu

  • Top Hat Member
  • Professional
  • ********
  • Posts: 487
  • Internets: +48/-0
Re: Python for noobs #lab 1
« Reply #1 on: April 09, 2014, 11:51:22 AM »
Thanks Gw6M :)

Appreciate the time and info - got the resources... now just need to find the time to sit down and learn.. arghh

Offline Guy with 6 Magikarps

  • Prospect
  • *
  • Posts: 29
  • Internets: +7/-0
  • @Ihave6magikarps [Twitter]
Re: Python for noobs #lab 1
« Reply #2 on: April 09, 2014, 01:11:36 PM »

Glad to see that, I will update the post and I will try to keep it to one or two post a week so it doesnt become a cluster. The updates will be separated by a "-" line.
like that one, if there are any issues pleas post or PM me. Thank you.
« Last Edit: April 09, 2014, 01:46:29 PM by Guy with 6 Magikarps »
When I'm in command every mission's a suicide mission.

Offline DarkTiger

  • DarkTiger is providence!
  • Top Hat Member
  • Prospect
  • ********
  • Posts: 21
  • Internets: +11/-0
  • Uncertainty certainly exists.
Re: Python for noobs #lab 1
« Reply #3 on: January 29, 2015, 12:47:29 AM »
wow that looks like a good class professor magikarp xD if u are still doing please let me know, im down to have u make assignments. it will keep people on track to actually learn the right way with a quiz , vocab, and a lab. just gotta find some time to knock it out. but it looks good, thanks!

   while (tacos == tasty)
        DarkTiger += fat;

    return indigestion;