Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Set the email address james.smith@xyz . chc . com' as a string value to a variable. Use proper string functions and create two variables

Set the email address "
james.smith@xyz.chc.com' as a string value to a variable. Use proper string functions and create two variables with string values as follows:
name = 'james.smith'
company ='xyz.chc'
Use code to determine length and positions.
2. Set up the following two variables as string values. No credit if these are set up as numbers.
price =' $252.15'
discount ='15%'
a. Clean up the strings and then convert them to numeric data type.
b. Using the cleaned up numeric data type variables from (a) assemble and print the following string.
"Price is $252.15 with discount of 15% the net price is $214.33.
Note: No credit if the numbers in the string are simply typed into it.
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

Did you consider possible audience sensitivities?

Answered: 1 week ago