MAP-UA.0109 Spring 2013 Samuel Marateck

ASSIGNMENT 2. Assigned date: THURS feb 14. Due THURS feb 21 11:59pm

Write a program that reads an integer as a string named s. Find its length (use the len function).Using the for loop structure for c in s where s is the string read, have the program print the integer in power of ten notation such that the decimal point appears after the first left-most digit. So that if the integer read is 643210, you program would first print 643210, then 6.43210 X 10 ^ 5. The ^ indicates the exponent. The 6.43210 part should be generated in the loop using a string.

Hint: use a counter in the for loop. If the value of the counter is one, concatenate a period with the previous value of the string. Finally, use the length to indicate the power of ten.