Question: Write a Python expression to do the following: [8 marks] Assuming that variable forecast has been assigned string 'It will be a sunny day today'

 Write a Python expression to do the following: [8 marks] Assuming

Write a Python expression to do the following: [8 marks] Assuming that variable forecast has been assigned string 'It will be a sunny day today' Write Python statements corresponding to these following: 1. To count, the number of occurrences of string 'day' in string forecast. 2. To capitalize the first character in the string forecast. 3. To replace the substring 'sunny' is by 'cloudy. 4. To split the substring using the default delimiter blank space. 7 - B I = E E

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!