Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Conditional Statements and Functions in Python Assessment Description It is essential in data science and related disciplines to understand the most basic decision-making processes in computing, as well as to be able to distinguish when, why, and how these specific practices/tools should be employed

Conditional Statements and Functions in Python Assessment Description It is essential in data science and related disciplines to understand the most basic decision-making processes in computing, as well as to be able to distinguish when, why, and how these specific practices/tools should be employed

Computer Science

Conditional Statements and Functions in Python

Assessment Description

It is essential in data science and related disciplines to understand the most basic decision-making processes in computing, as well as to be able to distinguish when, why, and how these specific practices/tools should be employed. For example, consider the following scenario of a real-world case study. COVID-19 means a variety of things to different people. The discussion of whether to get a vaccine or not is controversial in the U.S. A firm is hired to conduct a statistical analysis on how the effectiveness of people vaccinated versus unvaccinated. By using the Python programming fundamentals to create a Python program, the firm can evaluate the impact.

Practice

The exercises below include various aspects of Python programming that allow one to perform statistical operations in various applications. Although they are unrelated to any one scenario, they are practice examples you can use in your toolbox to evaluate data in a statistical analysis.

Read Chapters 3-4 from "Learn Python Programming : The No-Nonsense, Beginner's Guide to Programming, Data Science, and Web Development with Python 3.7," located in the topic Resources.

Review control statements and functions.

Access PyCharm. Then, demonstrate how to work with the complex objects as outlined below. Take appropriate screenshots (with descriptions) as needed. All documentation should be completed in your Jupyter Notebook IPYNB file.

Five Logical Operators

Choose five logical operators. In a table, write up the following and then execute your example.

The Command
The Description
Your own example
The Result
Selection Operators

Create your own if statement where there are five Code Blocks (e.g. Code block A, Code block B, etc.).
Construct a diagram of the if statement that you created (use correct flow chart symbols).
Create your own if/else statement where there are five Code Blocks (e.g. Code block A, Code block B, etc.)
Construct a diagram of the if/else statement that you created (use correct flow chart symbols).
Create your own if/elseif/else statement where there are five Code Blocks (e.g. Code block A, Code block B, etc.).
Construct a diagram of the if/elseif/else statement that you created (use correct flow chart symbols).
Create your own switch condition where there are five statements (e.g. create a story of wearing clothes based upon the weather).
Construct a diagram of the switch condition that you created (use correct flow chart symbols).
Loops

Create a for loop where the output increments by a single digit 20 times.

Create a for loop that utilizes the next command where the output increments to 35 with only the odd numbers showing in the output.

Utilize the following scenario and pseudocode to construct a Python script and then run the script and display the results:

There once was a nice young couple who needed to borrow $500,000 from their local bank to purchase a home. The annual interest rate is 4.75% annually. The lifetime of the mortgage is a 30-year loan, so they need to pay it off within 360 months. The couple decides that paying $1,750 per month would be best for them as their monthly mortgage payment. Will they pay the loan off in time with those numbers?

Pseudocode example (the pseudocode below are some basic components you should consider…you can construct as you see fit):

# setup

# convert annual interest to a monthly multiplier

# keep looping until the loan is paid off…

# print the results on screen

# end of loop

# print the total payments at the end

Functions

Create functions that take five arguments and multiplies them according to the type of object they are:

Scalar
Vector
Matrix
Plot each of the functions that you have constructed.

Deliverables

A Jupyter Notebook file to include appropriate screenshots (with descriptions).

Then, in 250-500 words, explain each control statement and function in your own words. Make sure to address when and why each would be used in data science practices as well as justify your rationale using sound statistical arguments and associated formulas.

APA style is not required, but solid academic writing is expected.

This assignment uses a rubric. Please review the rubric prior to beginning the assignment to become familiar with the expectations for successful completion.

You are not required to submit this assignment to LopesWrite

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE