habahut/CS112-Spring2012 — comment on commit fedf66aa29c7a894ac8b5d8b19ec8dfc0793f259
File:  line 0
By habahut:

Hey Alec

thanks for the detailed feedback! Just curious, what was the total
available points for this?

On Tue, Feb 7, 2012 at 3:21 AM, Alec Goebel

wrote:
> Homework 3
> ==========================
> | **Part** | **Points** |
> |-----------|------------|
> | base | 1 |
> | advanced | 0.75 |
> | clean code | 0.25 |
> | if statements | 0.25 |
> | **Total** | 2.25 |
>
> ## prissybot.py
> Well done. You covered the entire assignment and added if statements. Also, I'm glad someone figured out `time.sleep`.
>
> The only issue is you didn't implement step 1 exactly, which would have forced you to do string manipulation to create the input prompt. Here's what step one should have looked like:
>
> ```python
> name = raw_input("Enter your name: ")
> print ""
> print "PrissyBot: Hello there, %s!" % name
> resp = raw_input("%s: " % name)
> print 'PrissyBot: You mean, "%s, sir"!' % resp
> ```
>
> Finally, just a reminder, commas only work with print statements and they add a space
>
> ```python
>>>> print 1, 3, 5
> 1 3 5
> ```
>
> ## AsciiArt.py:
> Not a bad example of ascii art. Your variable names made it a bit hard to follow, like using `s` and `s1`. Also, as a rule you don't use empty print statments, use `print ""` instead to print and empty line.
>
> ## fractions.py:
> Well done on this. Obviously we hadn't gone over if statements yet but this is definitely a good use of them. Also, thank you for checking for the divide by zero error.
>
> I only have a few comments (not criticisms) about this file. Your input phrases could be consistent but that is just a design choice. Also, since you use commas there are a lot of excess spaces in your output. By using string formating you could be:
>
> ```python
> # what you have
>>>> print t," ",n,"/",d
> 1 2 / 4
>
> # cleaner
>>>> print "%d %d/%d" % (t, n, d)
> 1 2/4
> ```
>
> Also, in python if statements you don't need to wrap the conditionals in parentheses.
>
> ```python
> # not needed
> if (a == b):
> pass
>
> # cleaner
> if a == b:
> pass
> ````
>
> ## numberConversionsTable.py:
> Well done on this program as well. Your code is well formatted and clean. I can nitpick at the little things but overall really well done. One thing I noticed in this file and others is how you parse integers. You can write this as one statement instead. For example:
>
> ```python
> # two lines
> n = raw_input("Enter a number: ")
> n = int(n)
>
> # one line
> n = int(raw_input("Enter a number: "))
> ```
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/habahut/CS112-Spring2012/commit/fedf66aa29c7a894ac8b5d8b19ec8dfc0793f259#commitcomment-939883