# [closed] Homework 1.09

 0 Just to be sure: The input of the program (var x) is always a positive decimal number. Eg: 3.14 --> 3 6.5 --> 7 123.98 --> 124 2.0 --> 2 but not integers such as: 2 7678 (meaning that I will always find the decimal point) Am I right? asked 23 Feb '12, 06:37 Unai Herrán 210●2●4●18 accept rate: 15%

### The question has been closed for the following reason "The question is answered, right answer was accepted" by Unai Herrán 23 Feb '12, 10:53

 2 Doesn't matter, I figured that if I add .0 to a number it will convert it to a decimal numer x=1 x=x+0.0 print x will show: 1.0 answered 23 Feb '12, 06:44 Unai Herrán 210●2●4●18 1 Exactly. That was covered in lectures too. (23 Feb '12, 06:46) Snezhana
 0 Yes, since it says it's always a decimal number, it should always have a decimal portion. The decimal portion might be 0. In that case, it would just be 2.0. answered 23 Feb '12, 06:40 Glen 78●2●3
 0 You're right, just remember that spaces are not allowed (I'm sure you do remember that and what you've typed is just for more readability:) and also there could be a case like " 27. ", which is also decimal, in fact. answered 23 Feb '12, 06:43 Snezhana 1.6k●1●15●29

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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

×15,314
×97