hw 2 blastoff

Hello. This is my first post. Checking to see if there was an error in grading this code. I posted my code below. I know I used an extra If statement and my while condition is different but it works. Hopefully it was in error. Getting 1 question wrong is detrimental to overall homework grade. :^/


def countdown(number):
while number != 0:
print number
number = number - 1

if number == 0:
    print "Blastoff!!!"

asked 08 Mar '12, 08:59

Sam%20Vega's gravatar image

Sam Vega
183
accept rate: 0%

edited 08 Mar '12, 09:03

Angel's gravatar image

Angel
7.0k632112


3 Answers:

Maybe to many exclamation marks!!! ;)

link

answered 08 Mar '12, 09:01

dreyescat's gravatar image

dreyescat
6.9k163482

@dreyescat: Good one, I was looking at it for more than minute without realizing that... :)

@samv: It is very important to do exactly as the assignment says - read it more than once and when you are done, check that you have done what they wanted you to do.

(08 Mar '12, 09:06) Marek Bálint Marek%20B%C3%A1lint's gravatar image

@mareq: so i have it wrong because i used too many exclamation points? :^/

(08 Mar '12, 09:08) Sam Vega Sam%20Vega's gravatar image

Have a look at this please

link

answered 08 Mar '12, 09:05

Angel's gravatar image

Angel
7.0k632112

well the if clause is really redundant, but the grading bot won't notice :-)

link

answered 08 Mar '12, 09:02

Andreas%20Brecht's gravatar image

Andreas Brecht
1.1k317

Your answer
Question text:

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×15,358
×74
×69

Asked: 08 Mar '12, 08:59

Seen: 131 times

Last updated: 08 Mar '12, 09:08