sambwhit/CS112-Spring2012 — comment on commit 7e4290b866684b83508135ca2edba5ad488c4945
File:  line 0
By alecgoebel:

# Homework 3

| **Part** | **Points** |
|-----------|------------|
| base | 0.25 |
| advanced | 0 |
| **Total** | 0.25 |

First of all, the parts you did use you used correctly. That said, you missed some aspects of the homework. The first of all, at no point did you use a string in `raw_input` to create a prompt. You can do things like `raw_input("Enter a number: ")` to create a prompt. Also, since you have the users name you can use it to create a custom prompt: `raw_input(name + ":")`.

The other big problem is that you are using the `input` function. Input is, to quote the python documentation, "equivalent to eval(raw_input(prompt))." Eval is evil and should almost never be used . Since it just runs whatever python code you pass it, it can seriously break your code. Here is how you should be getting numbers:

```python
# bad
num = input("Enter a number: ")

# better
num = raw_input("Enter a number: ")
num = int(num) # or float(num) for a decimal

# as one line
num = int(raw_input("Enter a number: "))
```

Here is the full step one code so you have it.

```python
# Step 1
name = raw_input("Enter your name: ")
print ""
print "PrissyBot: Hello there, " + name + "!"
resp = raw_input(name + ":")
print "PrissyBot: You mean, \"" + resp + ", sir!\""
```