Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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', '')
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

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

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago