Here are all the comments that your Udacity Code Reviewer had about your code...

Size: px
Start display at page:

Download "Here are all the comments that your Udacity Code Reviewer had about your code..."

Transcription

1 Here are all the comments that your Udacity Code Reviewer had about your code... Line 4 in udacity_portfolio_project.py is Critical file_p=raw_input("pleaseenterthenetworklocationoftheportfolio file:") #locationoffileonnetwork Reviewer says: If you assume that the.csv file will always reside in the same directory as the project file itself and will always have a fixed name, it would be more convenient to use the os module to get the current working directory and then open the file. This way you won't have to ask the user for the file's path (which can be irritating for the user; and not to mention very error prone :P). Here's how the code would look: os.path.dirname(os.path.realpath( file ) Here, file refers to the current.py file. You can read more here: current directory and files directory However, if your program requires the user to provide the path of the.csv file, you should add some exception handling for erroneous inputs. Currently, if the user provides a wrong path, the program throws an error and the user has to rerun the program. Users will mess up the path often (the first time, I did too _ ) and you don't want your program to break every time that happens. So if a user submits a wrong path, your program should prompt the user and ask for the path again. You can read more here:

2 user input error handling Line 5 in udacity_portfolio_project.py is Nitpick port=open(file_p,"r") #opensfile Reviewer says: There's nothing wrong in the way you've written this. However, it may interest you to know a slightly more pythonic way of opening a file by using the 'with' keyword :D Using the with statement ensures that the opened file is closed before the Python program finishes execution. Example: with open('portfolio.csv', 'r') as port: reader = csv.reader(port, delimiter = ',') More information on this here: is the python keyword with used for Line 207 in udacity_portfolio_project.py is Awesome whileindustrycountryorcompanynotinaccepted: industrycountryorcompany=int(raw_input("wouldyou liketosummarizebycompany,industry,orcountry?(1=company,2= Industry,3=Country):")) Reviewer says: This is a good way of handling erroneous inputs from users. They can make the same mistake repeatedly without breaking the program. Very slick :) Line 257 in udacity_portfolio_project.py is Critical print"whenpromptedbytheprogram,typethethree lettercountryabbreviationinuppercaseintotheprompt.otherwise,to lookupacountry'sinfo,type-countryanalysis(\"countrythreeletter ABBREVIATION\")-makesuretheCountryNameisinuppercase.Ifnodata isreturned,thentherearenoloansoutstandingtothatcountry.please keepinmindthatyoumustinputthethreeletterabbreviationofthe

3 name!" Reviewer says: This line right here (including the indentation) is 437 character long (x_x). I had to scroll a lot horizontally to read it on a 13inch Mac. There are several other lines in the program where the line length exceeds way beyond characters. Google's Style Guide recommends max line length to be 80 characters. It's common amongst programmers, to set a maximum line length at 80 or 120 characters. You should consider doing so too. It will improve the readability of your code :) You can find the styleguide here: styleguide.googlecode.com/svn/trunk/pyguide.html Line 20 in udacity_portfolio_project.py is Nitpick fori_dini_id_invalid_list: foriinrange(len(i_id_invalid_list)): delportlist[i_d-i] Reviewer says: It's awesome that you've written a function that cleans invalid data. This way you're taking care of possible errors before hand :) However, these nested loops in this function look complicated and you could probably use comments here to make sure others reading this (or you reading it after very long) don't find it very hard to understand :? I tried printing the variables out to understand what the ranges of the loops meant and what data this function gets rid of, but the portfolio.csv file that you've provided along with the project does not have any invalid data to be deleted (by this function). Line 245 in udacity_portfolio_project.py is Nitpick print Reviewer says: A blank print statement hanging all by itself is a little unusual :?. I could see it in several places in the code. It's a lot more common to use '\n' within strings to print a line break in Python.

4 You probably already know this, and chose to use 'print' by itself for some reason. If not, you'll find more information here: Line 151 in udacity_portfolio_project.py is Awesome c_exp=sum([float(portlist[i][norm])foriin range(1,len(portlist))ifportlist[i][summed]== self.name]) Reviewer says: Good use of the sum function on a list comprehension to perform calculations. Very succinct :) Line 283 in udacity_portfolio_project.py is Critical fileopen=open("monthlyportfoliosummary.csv",'wb') portfoliofile=csv.writer(fileopen,dialect="excel", quotechar='"') portfoliofile.writerow(["month","exposure","capital","pd","lgd","rsq"]) portfoliofile.writerow([" ",sum_norm(),sum_capital(),wa_pd(),wa_lgd,wa_rsq()]) fileopen.close() else: Reviewer says: After creating the.csv file and closing it (with fileopen.close()), the program doesn't give any success message to the user. This will probably leave the user in doubt as to whether the file has been created or not. I myself got a bit confused and had to see the project's directory to find the.csv file there. You should probably leave a message like this after creating the file.csv for the user: The requested.csv file has been successfully created. You can find it in the folder that's enclosing this program. Line 307 in udacity_portfolio_project.py is Critical ecce,help=portfolioanalysisstart()

5 Reviewer says: The word 'help' is a reserved word in Python and it's considered bad practice to use a language's reserved words or keywords as a variable name. If you use a text editor with syntax highlighting, the word 'help' would appear colored in a.py file. This way you can avoid using any such word as a variable name. You should probably use a variable name like: need_help You can read Google's Python styleguide to see what they have to say about consistent variable names and class names: styleguide.googlecode.com/svn/trunk/pyguide.html You can check out this multi platform text editor with syntax highlighting: Line 248 in udacity_portfolio_project.py is Nitpick filetypeval=int(raw_input("wouldyouliketocreateamontlyportfolio summarizationfile?(1=yes,2=no):")) iffiletypeval==1: fileopen=open("monthlyportfoliosummary.csv",'wb') portfoliofile=csv.writer(fileopen,dialect="excel", quotechar='"') portfoliofile.writerow(["month","exposure","capital","pd","lgd","rsq"]) portfoliofile.writerow([" ",sum_norm(),sum_capital(),wa_pd(),wa_lgd,wa_rsq()]) fileopen.close() else: Reviewer says: Here, your code first asks the user to input either 1 (for yes) and 2 (for no). However, it executes the 'no' option if the user's input is not 1 (using else). This is alright and it works, but users may find it misleading if they submit another number (or letter) by mistake. Instead, your code should throw this question back at them if they give an input different from the ones your program expects. This way you can make sure your program doesn't do anything its user doesn't want it to. A similar problem exists in the function portfolioanalysisstart(). The raw_inputs expect

6 either a 1 or a 2, but the program proceeds indifferently for any number the user submits.

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to A PROGRAM IS A SEQUENCE of instructions that a computer can execute to perform some task. A simple enough idea, but for the computer to make any use of the instructions, they must be written in a form

More information

Lesson 4: Who Goes There?

Lesson 4: Who Goes There? Lesson 4: Who Goes There? In this lesson we will write a program that asks for your name and a password, and prints a secret message if you give the right password. While doing this we will learn: 1. What

More information

Here are all the comments that your Udacity Code Reviewer had about your code...

Here are all the comments that your Udacity Code Reviewer had about your code... Here are all the comments that your Udacity Code Reviewer had about your code Line 96 in finalproject.py is Critical hexagon.exitonclick() Reviewer says: The last line of the draw function of the hexagon

More information

Lab # 2. For today s lab:

Lab # 2. For today s lab: 1 ITI 1120 Lab # 2 Contributors: G. Arbez, M. Eid, D. Inkpen, A. Williams, D. Amyot 1 For today s lab: Go the course webpage Follow the links to the lab notes for Lab 2. Save all the java programs you

More information

The Three Rules. Program. What is a Computer Program? 5/30/2018. Interpreted. Your First Program QuickStart 1. Chapter 1

The Three Rules. Program. What is a Computer Program? 5/30/2018. Interpreted. Your First Program QuickStart 1. Chapter 1 The Three Rules Chapter 1 Beginnings Rule 1: Think before you program Rule 2: A program is a human-readable essay on problem solving that also executes on a computer Rule 3: The best way to improve your

More information

Java Style Guide. 1.0 General. 2.0 Visual Layout. Dr Caffeine

Java Style Guide. 1.0 General. 2.0 Visual Layout. Dr Caffeine September 25, 2002 Java Style Guide Dr Caffeine This document defines the style convention the students must follow in submitting their programs. This document is a modified version of the document originally

More information

Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis. Copyright 2012 L. Leona Davis All Rights Reserved

Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis. Copyright 2012 L. Leona Davis All Rights Reserved Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis Copyright 2012 L. Leona Davis All Rights Reserved Cover Photo by Dmitry Maslov Cover Design by L. Leona Davis Smashwords Edition June

More information

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners Getting Started Excerpted from Hello World! Computer Programming for Kids and Other Beginners EARLY ACCESS EDITION Warren D. Sande and Carter Sande MEAP Release: May 2008 Softbound print: November 2008

More information

Printing from a Macintosh (PowerPC) Client - OS Identifying your Server s IP address and its Queues. At the Nuvera Print Server

Printing from a Macintosh (PowerPC) Client - OS Identifying your Server s IP address and its Queues. At the Nuvera Print Server Nuvera Family Printing from a Macintosh (PowerPC) Client - OS 9 4.0.28 Identifying your Server s IP address and its Queues At the Nuvera Print Server 1. Right-click on the desktop. You'll see the Workspace

More information

Contents. What's New. Version released. Newsletter #31 (May 24, 2008) What's New New version released, version 4.3.3

Contents. What's New. Version released. Newsletter #31 (May 24, 2008) What's New New version released, version 4.3.3 Campground Master Newsletter #31 (May 24, 2008) 1 Newsletter #31 (May 24, 2008) Contents What's New New version released, version 4.3.3 Q & A Retrieving credit card information Guarantee Info missing the

More information

You've never had it SO EASY.

You've never had it SO EASY. You've never had it SO EASY. A friendly Word from the people at Microsoft. If you've been cautious about buying a word processing program, more power to you. This is your reward. M icrosoft Word. Now you

More information

SHOUTcast v2 - Broadcasting with Nicecast

SHOUTcast v2 - Broadcasting with Nicecast SHOUTcast v2 - Broadcasting with Nicecast In this tutorial we are going to explain how to broadcast using Nicecast to our SHOUTcast v2 servers running under CentovaCast 3. Differences Between ShoutCast

More information

DocuTech Family. Printing from a Macintosh (PowerPC) Client - OS xx. Identifying your Server s IP address and its Queues

DocuTech Family. Printing from a Macintosh (PowerPC) Client - OS xx. Identifying your Server s IP address and its Queues DocuTech Family Printing from a Macintosh (PowerPC) Client - OS 9 3.74.xx Identifying your Server s IP address and its Queues At the DocuSP Print Server 1. Right-click on the desktop. You'll see the Workspace

More information

The Crypt Keeper Cemetery Software Online Version Tutorials To print this information, right-click on the contents and choose the 'Print' option.

The Crypt Keeper Cemetery Software Online Version Tutorials To print this information, right-click on the contents and choose the 'Print' option. The Crypt Keeper Cemetery Software Online Version Tutorials To print this information, right-click on the contents and choose the 'Print' option. Home Greetings! This tutorial series is to get you familiar

More information

1 Getting used to Python

1 Getting used to Python 1 Getting used to Python We assume you know how to program in some language, but are new to Python. We'll use Java as an informal running comparative example. Here are what we think are the most important

More information

Most of the class will focus on if/else statements and the logical statements ("conditionals") that are used to build them. Then I'll go over a few

Most of the class will focus on if/else statements and the logical statements (conditionals) that are used to build them. Then I'll go over a few With notes! 1 Most of the class will focus on if/else statements and the logical statements ("conditionals") that are used to build them. Then I'll go over a few useful functions (some built into standard

More information

What is Flubaroo? Step 1: Create an Assignment

What is Flubaroo? Step 1: Create an Assignment What is Flubaroo? Flubaroo is free tool that helps you quickly grade multiple-choice or fill-in-blank assignments. It is more than just a grading tool, Flubaroo also: Computes average assignment score.

More information

Troubleshooting Maple Worksheets: Common Problems

Troubleshooting Maple Worksheets: Common Problems Troubleshooting Maple Worksheets: Common Problems So you've seen plenty of worksheets that work just fine, but that doesn't always help you much when your worksheet isn't doing what you want it to. This

More information

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications Hello World! Computer Programming for Kids and Other Beginners by Warren Sande and Carter Sande Chapter 1 Copyright 2009 Manning Publications brief contents Preface xiii Acknowledgments xix About this

More information

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Slide 1: Cover Welcome to lesson 3 of the db2 on Campus lecture series. Today we're going to talk about tools and scripting, and this is part 1 of 2

More information

Accelerating Information Technology Innovation

Accelerating Information Technology Innovation Accelerating Information Technology Innovation http://aiti.mit.edu Cali, Colombia Summer 2012 Lesson 1 Introduction to Python Agenda What is Python? and Why Python? Basic Syntax Strings User Input Useful

More information

Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way

Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way Introduction Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way Getting to know you Earthwork has inherited its layout from its ancestors, Sitework 98 and Edge.

More information

Topic 4D: Import and Export Contacts

Topic 4D: Import and Export Contacts Topic 4D: Import and Export Contacts If a corporation merges with another corporation it may become necessary to add the contacts to the new merged companies contact folder. This can be done by Importing

More information

(Ca...

(Ca... 1 of 8 9/7/18, 1:59 PM Getting started with 228 computational exercises Many physics problems lend themselves to solution methods that are best implemented (or essentially can only be implemented) with

More information

Accelerating Information Technology Innovation

Accelerating Information Technology Innovation Accelerating Information Technology Innovation http://aiti.mit.edu/program/philippines-summer-2012/ Philippines Summer 2012 Lecture 1 Introduction to Python June 19, 2012 Agenda About the Course What is

More information

Chapter 2. Editing And Compiling

Chapter 2. Editing And Compiling Chapter 2. Editing And Compiling Now that the main concepts of programming have been explained, it's time to actually do some programming. In order for you to "edit" and "compile" a program, you'll need

More information

Integrated Software Environment. Part 2

Integrated Software Environment. Part 2 Integrated Software Environment Part 2 Operating Systems An operating system is the most important software that runs on a computer. It manages the computer's memory, processes, and all of its software

More information

There are two ways to use the python interpreter: interactive mode and script mode. (a) open a terminal shell (terminal emulator in Applications Menu)

There are two ways to use the python interpreter: interactive mode and script mode. (a) open a terminal shell (terminal emulator in Applications Menu) I. INTERACTIVE MODE VERSUS SCRIPT MODE There are two ways to use the python interpreter: interactive mode and script mode. 1. Interactive Mode (a) open a terminal shell (terminal emulator in Applications

More information

HELPLINE. Dilwyn Jones

HELPLINE. Dilwyn Jones HELPLINE Dilwyn Jones Remember that you can send me your Helpline queries by email to helpline@quanta.org.uk, or by letter to the address inside the front cover. While we do our best to help, we obviously

More information

Microsoft Office Word 2010

Microsoft Office Word 2010 Microsoft Office Word 2010 Content Microsoft Office... 0 A. Word Basics... 4 1.Getting Started with Word... 4 Introduction... 4 Getting to know Word 2010... 4 The Ribbon... 4 Backstage view... 7 The Quick

More information

The Newsletter will contain a Title for the newsletter, a regular border, columns, Page numbers, Header and Footer and two images.

The Newsletter will contain a Title for the newsletter, a regular border, columns, Page numbers, Header and Footer and two images. Creating the Newsletter Overview: You will be creating a cover page and a newsletter. The Cover page will include Your Name, Your Teacher's Name, the Title of the Newsletter, the Date, Period Number, an

More information

Lesson 1. Importing and Organizing Footage using Premiere Pro CS3- CS5

Lesson 1. Importing and Organizing Footage using Premiere Pro CS3- CS5 Lesson 1 Importing and Organizing Footage using Premiere Pro CS3- CS5 When working with a video editor the video source will come from either a capturing process or importing video clips into the editing

More information

Assignment 6: The Power of Caches

Assignment 6: The Power of Caches Assignment 6: The Power of Caches Due by: April 20, 2018 before 10:00 pm Collaboration: Individuals or Registered Pairs (see Piazza). It is mandatory for every student to register on Piazza. Grading: Packaging

More information

Lesson 3 Transcript: Part 2 of 2 Tools & Scripting

Lesson 3 Transcript: Part 2 of 2 Tools & Scripting Lesson 3 Transcript: Part 2 of 2 Tools & Scripting Slide 1: Cover Welcome to lesson 3 of the DB2 on Campus Lecture Series. Today we are going to talk about tools and scripting. And this is part 2 of 2

More information

Writing and Running Programs

Writing and Running Programs Introduction to Python Writing and Running Programs Working with Lab Files These instructions take you through the steps of writing and running your first program, as well as using the lab files in our

More information

Week - 01 Lecture - 04 Downloading and installing Python

Week - 01 Lecture - 04 Downloading and installing Python Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 01 Lecture - 04 Downloading and

More information

There are two ways to use the python interpreter: interactive mode and script mode. (a) open a terminal shell (terminal emulator in Applications Menu)

There are two ways to use the python interpreter: interactive mode and script mode. (a) open a terminal shell (terminal emulator in Applications Menu) I. INTERACTIVE MODE VERSUS SCRIPT MODE There are two ways to use the python interpreter: interactive mode and script mode. 1. Interactive Mode (a) open a terminal shell (terminal emulator in Applications

More information

Tracking changes in Word 2007 Table of Contents

Tracking changes in Word 2007 Table of Contents Tracking changes in Word 2007 Table of Contents TRACK CHANGES: OVERVIEW... 2 UNDERSTANDING THE TRACK CHANGES FEATURE... 2 HOW DID THOSE TRACKED CHANGES AND COMMENTS GET THERE?... 2 WHY MICROSOFT OFFICE

More information

Getting Started with Python

Getting Started with Python Getting Started with Python Python is a general purpose, high level programming language that is used in a variety of application domains. The Python language has a very clear and expressive syntax as

More information

My Favorite bash Tips and Tricks

My Favorite bash Tips and Tricks 1 of 6 6/18/2006 7:44 PM My Favorite bash Tips and Tricks Prentice Bisbal Abstract Save a lot of typing with these handy bash features you won't find in an old-fashioned UNIX shell. bash, or the Bourne

More information

Java Programming Constructs Java Programming 2 Lesson 1

Java Programming Constructs Java Programming 2 Lesson 1 Java Programming Constructs Java Programming 2 Lesson 1 Course Objectives Welcome to OST's Java 2 course! In this course, you'll learn more in-depth concepts and syntax of the Java Programming language.

More information

Introduction to Python Code Quality

Introduction to Python Code Quality Introduction to Python Code Quality Clarity and readability are important (easter egg: type import this at the Python prompt), as well as extensibility, meaning code that can be easily enhanced and extended.

More information

AVL Loom Configuration Tool

AVL Loom Configuration Tool AVL Loom Configuration Tool This program is only for those computers running the Windows operating system. It will not run on a Mac. It is intended to be a very simple application that will not run into

More information

CS125 : Introduction to Computer Science. Lecture Notes #4 Type Checking, Input/Output, and Programming Style

CS125 : Introduction to Computer Science. Lecture Notes #4 Type Checking, Input/Output, and Programming Style CS125 : Introduction to Computer Science Lecture Notes #4 Type Checking, Input/Output, and Programming Style c 2005, 2004, 2002, 2001, 2000 Jason Zych 1 Lecture 4 : Type Checking, Input/Output, and Programming

More information

Microsoft's latest OS is a lot better than its predecessor, but it still has some annoying quirks. We help you solve them.

Microsoft's latest OS is a lot better than its predecessor, but it still has some annoying quirks. We help you solve them. Welcome! HOW-TO How to fix five Windows 10 headaches Microsoft's latest OS is a lot better than its predecessor, but it still has some annoying quirks. We help you solve them. By Preston Gralla Contributing

More information

STATS 507 Data Analysis in Python. Lecture 2: Functions, Conditionals, Recursion and Iteration

STATS 507 Data Analysis in Python. Lecture 2: Functions, Conditionals, Recursion and Iteration STATS 507 Data Analysis in Python Lecture 2: Functions, Conditionals, Recursion and Iteration Functions in Python We ve already seen examples of functions: e.g., type()and print() Function calls take the

More information

Post Experiment Interview Questions

Post Experiment Interview Questions Post Experiment Interview Questions Questions about the Maximum Problem 1. What is this problem statement asking? 2. What is meant by positive integers? 3. What does it mean by the user entering valid

More information

LOOPS. Repetition using the while statement

LOOPS. Repetition using the while statement 1 LOOPS Loops are an extremely useful feature in any programming language. They allow you to direct the computer to execute certain statements more than once. In Python, there are two kinds of loops: while

More information

CheckBook Pro 2 Help

CheckBook Pro 2 Help Get started with CheckBook Pro 9 Introduction 9 Create your Accounts document 10 Name your first Account 11 Your Starting Balance 12 Currency 13 We're not done yet! 14 AutoCompletion 15 Descriptions 16

More information

MITOCW watch?v=se4p7ivcune

MITOCW watch?v=se4p7ivcune MITOCW watch?v=se4p7ivcune The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

Microsoft Excel 2010 Training. Excel 2010 Basics

Microsoft Excel 2010 Training. Excel 2010 Basics Microsoft Excel 2010 Training Excel 2010 Basics Overview Excel is a spreadsheet, a grid made from columns and rows. It is a software program that can make number manipulation easy and somewhat painless.

More information

T H E I N T E R A C T I V E S H E L L

T H E I N T E R A C T I V E S H E L L 3 T H E I N T E R A C T I V E S H E L L The Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform. Ada Lovelace, October 1842 Before

More information

How To Force Restore A Computer That Won Boot Up After System

How To Force Restore A Computer That Won Boot Up After System How To Force Restore A Computer That Won Boot Up After System If your computer won't start up normally, you may need to use a disk repair utility This can occur after an improper shutdown, forced restart,

More information

USING DRUPAL. Hampshire College Website Editors Guide https://drupal.hampshire.edu

USING DRUPAL. Hampshire College Website Editors Guide https://drupal.hampshire.edu USING DRUPAL Hampshire College Website Editors Guide 2014 https://drupal.hampshire.edu Asha Kinney Hampshire College Information Technology - 2014 HOW TO GET HELP Your best bet is ALWAYS going to be to

More information

ASDS. Draft. In this procedure, a file residing on the user's personal computer is uploaded to a staging area.

ASDS. Draft. In this procedure, a file residing on the user's personal computer is uploaded to a staging area. Version 1.0 Document Generation Date 5/2/2008 Date Modified 5/2/2008 Last Changed by ASDS Status Draft Importing A Federal Data File Concept Federal data files containing ISIR and NSLDS data are received

More information

Article Buddy User Manual

Article Buddy User Manual Article Buddy User Manual Hello and thank you for buying Article Buddy. This guide right here focuses on the features of this absolutely amazing software and how to use it to its fullest. How Do You Use

More information

6.170 Laboratory in Software Engineering Java Style Guide. Overview. Descriptive names. Consistent indentation and spacing. Page 1 of 5.

6.170 Laboratory in Software Engineering Java Style Guide. Overview. Descriptive names. Consistent indentation and spacing. Page 1 of 5. Page 1 of 5 6.170 Laboratory in Software Engineering Java Style Guide Contents: Overview Descriptive names Consistent indentation and spacing Informative comments Commenting code TODO comments 6.170 Javadocs

More information

MITOCW MIT6_01SC_rec2_300k.mp4

MITOCW MIT6_01SC_rec2_300k.mp4 MITOCW MIT6_01SC_rec2_300k.mp4 KENDRA PUGH: Hi. I'd like to talk to you today about inheritance as a fundamental concept in object oriented programming, its use in Python, and also tips and tricks for

More information

4.2 Function definitions the basics

4.2 Function definitions the basics 4.2. FUNCTION DEFINITIONS THE BASICS 89 4.2 Function definitions the basics There are three questions you must answer before you can write a function definition: What will the function do? What inputs

More information

Version Copyright Feel free to distribute this guide at no charge...

Version Copyright Feel free to distribute this guide at no charge... Version 2.0 Feel free to distribute this guide at no charge... You cannot edit or modify this guide in anyway. It must be left exactly the way it is. This guide is only accurate from the last time it was

More information

Computer Science Lab Exercise 1

Computer Science Lab Exercise 1 1 of 10 Computer Science 127 - Lab Exercise 1 Introduction to Excel User-Defined Functions (pdf) During this lab you will experiment with creating Excel user-defined functions (UDFs). Background We use

More information

The following content is provided under a Creative Commons license. Your support

The following content is provided under a Creative Commons license. Your support MITOCW Lecture 2 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation

More information

Exporting Contacts and Updating the Contacts in Your New Vision Source Address

Exporting Contacts and Updating the Contacts in Your New Vision Source  Address Exporting Contacts and Updating the Contacts in Your New Vision Source Email Address How to Export Yahoo Contacts You can export your contacts from Yahoo to an external file as a backup or in preparation

More information

BBC Learning English Face up to Phrasals Mark's Mistake

BBC Learning English Face up to Phrasals Mark's  Mistake BBC Learning English Face up to Phrasals Mark's Email Mistake Episode 1: Email Fun? Mark: Hey Ali, did you check out that email I sent you the one about stupid Peter, saying how stupid he is? Oh dear.

More information

MITOCW watch?v=9h6muyzjms0

MITOCW watch?v=9h6muyzjms0 MITOCW watch?v=9h6muyzjms0 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

A lot of people make repeated mistakes of not calling their functions and getting errors. Make sure you're calling your functions.

A lot of people make repeated mistakes of not calling their functions and getting errors. Make sure you're calling your functions. Handout 2 Functions, Lists, For Loops and Tuples [ ] Functions -- parameters/arguments, "calling" functions, return values, etc. Please make sure you understand this example: def square(x): return x *

More information

Copyright. For more information, please read the Disclosures and Disclaimers section at the end of this ebook. First PDF Edition, February 2013

Copyright. For more information, please read the Disclosures and Disclaimers section at the end of this ebook. First PDF Edition, February 2013 Copyright This ebook is Copyright 2013 Teresa Miller (the Author ). All Rights Reserved. Published in the United States of America. The legal notices, disclosures, and disclaimers in the front and back

More information

1 of 5 5/11/2006 12:10 AM CS 61A Spring 2006 Midterm 2 solutions 1. Box and pointer. Note: Please draw actual boxes, as in the book and the lectures, not XX and X/ as in these ASCII-art solutions. Also,

More information

Using the Android CircuitPython Editor

Using the Android CircuitPython Editor Using the Android CircuitPython Editor Created by Timothy Cocks Last updated on 2018-12-18 09:48:51 PM UTC Guide Contents Guide Contents Overview Android Circuit Python Editor Going Mobile Parts List Circuit

More information

Programming with Haiku

Programming with Haiku Programming with Haiku Lesson 4 Written by DarkWyrm All material 2010 DarkWyrm Source Control: What is It? In my early days as a developer on the Haiku project I had troubles on occasion because I had

More information

Understanding And Using Custom Queries

Understanding And Using Custom Queries Purpose This document describes how to use the full flexibility of Nagios to get the most out of your network flow data. Target Audience Network admins performing forensic analysis on a network's flow

More information

Formatting an APA style Paper in Google Docs 1

Formatting an APA style Paper in Google Docs 1 Formatting an APA style Paper in Google Docs 1 IMPORTANT: Google Docs has default settings you need to understand before starting to format a paper. Paragraphs can be further indented left only. Normal

More information

vi Primer Adapted from:

vi Primer Adapted from: Adapted from: http://courses.knox.edu/cs205/205tutorials/viprimer.html vi Primer This document is designed to introduce you to the standard UNIX screen editor, vi (short for "visual"). Vi can be used to

More information

Copied from: https://www.cs.hmc.edu/twiki/bin/view/cs5/lab1b on 3/20/2017

Copied from: https://www.cs.hmc.edu/twiki/bin/view/cs5/lab1b on 3/20/2017 Hw 1, Part 2 (Lab): Functioning smoothly! Using built-in functions Copied from: https://www.cs.hmc.edu/twiki/bin/view/cs5/lab1b on 3/20/2017 First, try out some of Python's many built-in functions. These

More information

Physics REU Unix Tutorial

Physics REU Unix Tutorial Physics REU Unix Tutorial What is unix? Unix is an operating system. In simple terms, its the set of programs that makes a computer work. It can be broken down into three parts. (1) kernel: The component

More information

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG 1 Notice Class Website http://www.cs.umb.edu/~jane/cs114/ Reading Assignment Chapter 1: Introduction to Java Programming

More information

Semester 2, 2018: Lab 1

Semester 2, 2018: Lab 1 Semester 2, 2018: Lab 1 S2 2018 Lab 1 This lab has two parts. Part A is intended to help you familiarise yourself with the computing environment found on the CSIT lab computers which you will be using

More information

MITOCW watch?v=0jljzrnhwoi

MITOCW watch?v=0jljzrnhwoi MITOCW watch?v=0jljzrnhwoi The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

Fundamentals. Fundamentals. Fundamentals. We build up instructions from three types of materials

Fundamentals. Fundamentals. Fundamentals. We build up instructions from three types of materials Fundamentals We build up instructions from three types of materials Constants Expressions Fundamentals Constants are just that, they are values that don t change as our macros are executing Fundamentals

More information

CSC 148 Lecture 3. Dynamic Typing, Scoping, and Namespaces. Recursion

CSC 148 Lecture 3. Dynamic Typing, Scoping, and Namespaces. Recursion CSC 148 Lecture 3 Dynamic Typing, Scoping, and Namespaces Recursion Announcements Python Ramp Up Session Monday June 1st, 1 5pm. BA3195 This will be a more detailed introduction to the Python language

More information

Linked Lists. What is a Linked List?

Linked Lists. What is a Linked List? Linked Lists Along with arrays, linked lists form the basis for pretty much every other data stucture out there. This makes learning and understand linked lists very important. They are also usually the

More information

The Domino Designer QuickStart Tutorial

The Domino Designer QuickStart Tutorial The Domino Designer QuickStart Tutorial 1. Welcome The Domino Designer QuickStart Tutorial You've installed Domino Designer, you've taken the Designer Guided Tour, and maybe you've even read some of the

More information

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. Guide to and Hi everybody! In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. This guide focuses on two of those symbols: and. These symbols represent concepts

More information

Notepad++ The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3. Installing Notepad++

Notepad++  The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3. Installing Notepad++ Notepad++ The COMPSCI 101 Text Editor for Windows The text editor that we will be using in the Computer Science labs for creating our Python programs is called Notepad++ and is freely available for the

More information

An algorithm may be expressed in a number of ways:

An algorithm may be expressed in a number of ways: Expressing Algorithms pseudo-language 1 An algorithm may be expressed in a number of ways: natural language: flow charts: pseudo-code: programming language: usually verbose and ambiguous avoid most (if

More information

Advisor Answers. January, Visual FoxPro 3.0 and 5.0

Advisor Answers. January, Visual FoxPro 3.0 and 5.0 January, 1998 Advisor Answers Visual FoxPro 3.0 and 5.0 Q: I would like to create a combo box that functions exactly like the FoxPro help index, that is, when the user types in a value, that value is automatically

More information

PaintPot: (Part 1) What You're Building. Before starting

PaintPot: (Part 1) What You're Building. Before starting PaintPot: (Part 1) This tutorial introduces the Canvas component for creating simple two-dimensional graphics. You'll build an app that lets you draw on the phone screen in different colors. Historical

More information

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 [talking head] Formal Methods of Software Engineering means the use of mathematics as an aid to writing programs. Before we can

More information

Chris' Makefile Tutorial

Chris' Makefile Tutorial Chris' Makefile Tutorial Chris Serson University of Victoria June 26, 2007 Contents: Chapter Page Introduction 2 1 The most basic of Makefiles 3 2 Syntax so far 5 3 Making Makefiles Modular 7 4 Multi-file

More information

Week 2: The Clojure Language. Background Basic structure A few of the most useful facilities. A modernized Lisp. An insider's opinion

Week 2: The Clojure Language. Background Basic structure A few of the most useful facilities. A modernized Lisp. An insider's opinion Week 2: The Clojure Language Background Basic structure A few of the most useful facilities A modernized Lisp Review of Lisp's origins and development Why did Lisp need to be modernized? Relationship to

More information

Debugging. CSE 2231 Supplement A Annatala Wolf

Debugging. CSE 2231 Supplement A Annatala Wolf Debugging CSE 2231 Supplement A Annatala Wolf Testing is not debugging! The purpose of testing is to detect the existence of errors, not to identify precisely where the errors came from. Error messages

More information

What is XHTML? XHTML is the language used to create and organize a web page:

What is XHTML? XHTML is the language used to create and organize a web page: XHTML Basics What is XHTML? XHTML is the language used to create and organize a web page: XHTML is newer than, but built upon, the original HTML (HyperText Markup Language) platform. XHTML has stricter

More information

An Introduction to Python

An Introduction to Python An Introduction to Python Day 2 Renaud Dessalles dessalles@ucla.edu Python s Data Structures - Lists * Lists can store lots of information. * The data doesn t have to all be the same type! (unlike many

More information

How to create an eactivity on the Casio fx9860g

How to create an eactivity on the Casio fx9860g How to create an eactivity on the Casio fx9860g What you'll need A Casio fx9860g A computer running Windows 2000 or later The USB cable that came with your fx9860g The FA-124 software that came on CD with

More information

The current topic: Python. Announcements. Python. Python

The current topic: Python. Announcements. Python. Python The current topic: Python Announcements! Introduction! reasons for studying languages! language classifications! simple syntax specification Object-oriented programming: Python Types and values Syntax

More information

MICROSOFT WORD 2010 BASICS

MICROSOFT WORD 2010 BASICS MICROSOFT WORD 2010 BASICS Word 2010 is a word processing program that allows you to create various types of documents such as letters, papers, flyers, and faxes. The Ribbon contains all of the commands

More information

Applying for Jobs Online

Applying for Jobs Online Applying for Jobs Online Hi, I m Sarah. I m here to show you how to apply for a job using an online application form. Most jobs now require you to fill out an application on the Internet. In this course

More information

SEO According to Google

SEO According to Google SEO According to Google An On-Page Optimization Presentation By Rachel Halfhill Lead Copywriter at CDI Agenda Overview Keywords Page Titles URLs Descriptions Heading Tags Anchor Text Alt Text Resources

More information

How to Convert a Microsoft Word Document to PDF Format

How to Convert a Microsoft Word Document to PDF Format How to Convert a Microsoft Word Document to PDF Format Community Tested In this Article: Article Summary Using SmallPDF Using Google Drive Using Word on Windows Using Word on Mac This wikihow teaches you

More information

The first screen is the welcome screen. It shows the product name, number of designs included, information on "Notes", etc.

The first screen is the welcome screen. It shows the product name, number of designs included, information on Notes, etc. Confused about compressed files, zipped files, unzip software, file extractions... etc., etc., etc.? Our products all come with a simple, easy follow Wizard for installing the designs to your computer

More information