Homework Solution: Give the following values in the exponential notation of Python, such that there is only one significant digit to the left of the d…

    HOMEWORK#2 Credit 5 points Due date: Sep 10, 11:59PM To be submitted: answers as text file (yourname.txt) 1. Give the following values in the exponential notation of Python, such that there is only one significant digit to the left of the decimal point. (a) 4580.5034 (b) 000000046004 (c) 5000402.000000000006 2. Which of the floating-point values in question 1 would exceed the representation of the precision of floating points typically supported in Python? 3. The following format function can be used to display the floating-point value in variable result with three decimal digits of precision. print(format(result, 3r) Give a modified version of the format function printformat(result, 3f)) so that commas are included in the displayed results. 4. Give the string of binary digits that represents, (a) The string Hil in ASCII code. (Hint: 01001000 01101001 00100001) (b) The literal string am 24. 5. Use the print function in Python to output (a) Its raining today (b) John Doe 123 Main Street Anytown, Maryland 21009 on three John Doe 123 Main Street Anytown, Maryland 21009 separate lines, as follows:
    Give the following values in the exponential notation of Python, such that there is only one significant digit to the left of the decimal point. (a) 4580.5034 (b) 000000046004 (c) 5000402.000000000006 Which of the floating-point values in question 1 would exceed the representation of the precision of floating points typically supported in Python? The following format function can be used to display the floating-point value in variable result with three decimal digits of precision. print(format(result, "3f')) Give a modified version of the format function print(format(result, 3f')) so that commas are included in the displayed results. Give the string of binary digits that represents, (a) The string 'Hi!' in ASCII code. (b) The literal string "I am 24'. Use the print function in Python to output (a) It's raining today (b) John Doe 123 Main Street Anytown, Maryland 21009 on three separate lines, as follows: John Doe 123 Main Street Anytown, Maryland 21009

    Expert Answer

     
    1 a = 4.5805034e3

    HOMEWORK#2 Credit 5 apexs Due date: Sep 10, 11:59PM To be submitted: repartees as passage improve (yourname.txt) 1. Give the forthcoming appreciates in the exponential not attributable attributableation of Python, such that there is merely undivided expressive digit to the left of the decimal apex. (a) 4580.5034 (b) 000000046004 (c) 5000402.000000000006 2. Which of the incomplete-apex appreciates in interrogation 1 would surpass the justice of the nicety of incomplete apexs typically cheered in Python? 3. The forthcoming format exercise can be used to vault the incomplete-apex appreciate in changeable effect with three decimal digits of nicety. imprint(format(result, 3r) Give a mitigated rendering of the format exercise imprintformat(result, 3f)) so that commas are interjacent in the vaulted effects. 4. Give the string of binary digits that represents, (a) The string Hil in ASCII order. (Hint: 01001000 01101001 00100001) (b) The actual string am 24. 5. Use the imimsculpture exercise in Python to output (a) Its raining today (b) John Doe 123 Main Street Anytown, Maryland 21009 on three John Doe 123 Main Street Anytown, Maryland 21009 disjoined lines, as follows:

    Give the forthcoming appreciates in the exponential not attributable attributableation of Python, such that there is merely undivided expressive digit to the left of the decimal apex. (a) 4580.5034 (b) 000000046004 (c) 5000402.000000000006 Which of the incomplete-apex appreciates in interrogation 1 would surpass the justice of the nicety of incomplete apexs typically cheered in Python? The forthcoming format exercise can be used to vault the incomplete-apex appreciate in changeable effect with three decimal digits of nicety. imprint(format(result, “3f’)) Give a mitigated rendering of the format exercise imprint(format(result, 3f’)) so that commas are interjacent in the vaulted effects. Give the string of binary digits that represents, (a) The string ‘Hi!’ in ASCII order. (b) The actual string “I am 24′. Use the imimsculpture exercise in Python to output (a) It’s raining today (b) John Doe 123 Main Street Anytown, Maryland 21009 on three disjoined lines, as follows: John Doe 123 Main Street Anytown, Maryland 21009

    Expert Repartee

     

    1
    a = 4.5805034e3
    b = 4.6004e-7
    c = 5.000402000000000006e6

    2
    5.000402000000000006e6 conciliate not attributable attributable attributable answer incomplete apex appreciate nicety

    3
    print(“{:,}”.format(result))

    4.
    I am 24 –> 01001001 00100000 01100001 01101101 00100000 00110010 00110100

    5.
    print(“It’s raining today”)
    print(“John Doen123 Main StreetnAnytown, Maryland 21009”)