Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Cleaning Data: Let s be a string that contains a sequence of decimal numbers separated by commas, but somehow the data is corrupted and a

Cleaning Data: Let s be a string that contains a sequence of decimal numbers separated by commas, but somehow the data is corrupted and a random * shows up either right after a comma, before a comma, or before the rst term of an integer number. e.g. (that's exempli gratia, latin abbreviation of `for example') s = `1.23,*2.4*, 3.123,*5.1, 8.7*, *7.23, *3.23*'. Write a program that prints the sum of the numbers in the string s. Note, the whitespace is unevenly distributed in the string as well. Do this 2 ways: 1. without using any built in functions or methods associated to the string object but with a for or while loop, and 2. with built in string methods.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

Students also viewed these Databases questions

Question

Know about the different kinds of consultants

Answered: 1 week ago

Question

What roles have these individuals played in your life?

Answered: 1 week ago

Question

1. Write down two or three of your greatest strengths.

Answered: 1 week ago