Question: Task 1 : Print hello world In Task 2 : Read in two values ( user input ) , convert to integers, and then print

Task 1: Print hello world
In
Task 2: Read in two values (user input), convert to integers, and then print the sum
In ?** :
Note: type(variable) lets you check the data type of variable.
In []:
Note: In jupyter notebooks, you can also display values without the print (shown below).
In []:
Question: What prints if you don't convert to integers first?
In []:
In []:
Task 3: Create a function called "search"
This function should take in two string values (let's call them a and b). Both a and b should be set to all lowercase. Then search for the substring b in
a. It should return the index of the found substring, or -1 if not found.
In []:
Here are some examples to test
In []: search('Hello world', 'hello')
In []:
In []: search('Hello world', '')
 Task 1: Print hello world In Task 2: Read in two

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!