Homework 1.9 marked incorret

hello there here was my answer for homework 1 question 9

x = x + 0.5
num = str(x)

pt = num.find('.')

print num[:pt]

which matches the video answet but marked incorrect. can someone look into this and correct?

asked 05 Mar '12, 05:31

Aditya%20Iyer's gravatar image

Aditya Iyer
112
accept rate: 0%

edited 05 Mar '12, 05:38

KenavR's gravatar image

KenavR
5.2k32054


One Answer:

Maybe you reassigned x before the posted code or you deleted a comment line. We need to see the complete submission to give the correct reason. The code it self is correct.

link

answered 05 Mar '12, 05:35

KenavR's gravatar image

KenavR
5.2k32054

edited 05 Mar '12, 05:36

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,297
×1,718
×323
×108
×97
×33

Asked: 05 Mar '12, 05:31

Seen: 201 times

Last updated: 05 Mar '12, 05:38