Submission of Assignment 02

Professor,

On this one, I’m confused on what you are asking. The question asked us to set the variable MYDECIMAL to 0.1 using decimal without adjusting the precision. I took this to mean that you wanted Decimal(0.1), like on page 158. I’m assuming then you wanted Decimal(‘0.1’) by passing in the string. I thought this was a way of adjusting the precision? How am I misreading this? I know they are like floating point numbers with a fixed number of decimal points. What major concept am I overlooking. I may just need to go back and read that section again.

From: Chad Heuschober [mailto:notifications@github.com]
Sent: Monday, September 8, 2014 4:35 PM
To: is210-2014-fall-02/is210_lesson_02
Cc: kevin.doles@spsmail.cuny.edu
Subject: Re: [is210_lesson_02] Submission of Assignment 02 (#10)


In numtypes.py:

> @@ -0,0 +1,12 @@

> +#!/usr/bin/env python

> +# -*- coding: UTF-8 -*-

> +

> +import decimal

> +from decimal import*

> +import fractions

> +from fractions import Fraction

> +FLOATVAR = 0.1

> +DECIMALVAR = Decimal(0.1)

When you create an object inside your Decimal() call, what type is it?

Better yet, think of it with variables:

MYVAR = 0.1

MYDEC = Decimal(MYVAR)

Now, what data type is MYVAR?

—
Reply to this email directly or view it on GitHub<https://github.com/is210-2014-fall-02/is210_lesson_02/pull/10/files#r17265004>.