Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Jupyter Notebook, complete the following scenarios. Include all instructions in a markdown cell in the notebook followed by the Python code to satisfy the

Using Jupyter Notebook, complete the following scenarios. Include all instructions in a markdown cell in the notebook followed by the Python code to satisfy the scenario. Run the code from each scenario to validate that the code is working as expected. Results should be captured and saved in the Jupyter Notebook.
Create a Python function to determine whether a number is within a certain range of numbers. For instance, is 5 within the range of 3-11? Include the text to print out to the user the result, such as "The number is in range" or "The number is out of range". The arguments for this function should include the number to check and two additional numbers to define the range. Please test the both conditions.
Create a Python function to print only the even numbers from an entered list. Output only the even numbers in the list as a list/array.
Create a text file using a basic text editor such as Notepad or TextEdit and name it hw1.txt. Create a short Python function to read and print the contents of this file.
Create another Python function to append a line of text to the file and print the contents of the file. Use the hw1.txt file from scenario 3 above.
Create a Python function to read a file and store the contents in a list/array. Use the hw1.txt file from the scenario 4 above.

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

More Books

Students also viewed these Databases questions