Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Square root in jupyter notebook

29/11/2021 Client: muhammad11 Deadline: 2 Day

Python

● Note: ​Plagiarism​ is serious. ○ This work should be finished independently. ○ Getting help from googling or reading books are encouraged.

● Submission

○ Please submit files to Blackboard (see red font below). ○ Please clearly name your file with your last name, as indicated below​. The grader would download many

files at once, and having the last name in filename is crucial.

Objective ● Python basic arithmetic operators

○ +, -, *, /, **, % ● Python string formatting ● Write python code in a ​text editor​, save the file (some editor like PyCharm auto saves), then ​run code on

command line or inside of text editor ● Learn that body of python code, except for strings, are mostly ​lower case letters​ and numbers ● Functions: Learn how a ​function​ looks like from given examples. Modify functions and observe results. This is

only to help students with basic understanding of functions. In later lectures we’ll cover more on python functions.

Problem 1 -- Change Counter

Objectives ● print() function

○ print(‘some string’) or print(variable_name), note that we'll need to add quotes when printing strings.

● input() function ○ self learning how to use "input" function. please google. ○ Example: a = input(‘this is the prompt part of the input: ‘)

this will prompt on command line, then the command line input will be assigned to variable “a” ○ Note: if we input an integer in prompt, the type of the variable will be string, not integer. That’s why we

need specific type converting, using ​int()​ below, can also use ​eval()

● Convert String to Integer

○ As provided in code below, int(‘123’) will convert a string ‘123’ to integer 123, so we can perform arithmetic calculation with the integers

● Execute Python Program

Instructions 1. Download skeleton code file: ​change_counter_skeleton.py​ from Blackboard,

2. Finish the THREE missing blocks indicated in the code below using “....”, according to the directions. Use text

editor to edit the code. Save it to a file named:​ ​change_counter_.py​, example, if your last name is Smith, then your file would be named: change_counter_smith.py.

○ PyCharm can "rename" a file. Google on how to. ○ Submit your code to blackboard, the file should be named: change_counter_yourlastnamehere.py

3. Run the code:

○ If you run on terminal: type: python3 path/to/your/code/change_counter_xxx.py On some computers it's "python" not "python3"

○ If you run on PyCharm, right click, press: run change_counter_xxx.py

○ You don't have to submit the result for running your code, running code is to make sure the code is well written and the output is as intended. Example Code Execution Screenshot. You're only required to submit the python file, not result. The screenshot is only to show us how to run code.

○ An example of how I ran my code on Mac Terminal:

Problem 2: Math Module & String Formatting

Objective ● Learn what is ‘math’ module, how to use a ​method​ in math ​module​ by ‘dot notation’

○ math.sqrt(9) # math is the ‘module’, sqrt is a ‘method’ inside of math module ○ math.floor(5.8)

● f-String formatting Example:

○ >>> due_date = "tomorrow" >>> print(f"The due date of this homework is {due_date}.")

Description If you still don't have Jupyter Notebook installed, please email the instructor or TA. For homework requiring Jupyter, feel free to do it in a python file and submit it.

1. Follow the steps in ​‘Math.ipynb'​ provided, try each step and run it. No need to submit anything from Math.ipynb, this is only for practice.

2. Using Math.ipynb as reference, create a new python file using text editor, call it math_practice_.py

a. There should be a function called ‘main’, for how to define a function, follow examples from Problem 1 above. The function should take no argument, in other words, it should look like "def main():" with empty parentheses.

b. In this function 'main', we’ll play with ​math.pi, math.sqrt, math,exp, math.log10, math.sin​. Write code that will do the following calculation, then print the result using f-strings.

i. Calculate 10 * pi ii. Calculate square root of 15129 iii. Calculate e**10 using math.exp

If you are not sure what "e" is, see this or just google. https://en.wikipedia.org/wiki/E_(mathematical_constant)

iv. Calculate log10 of 10000 (observe what data type it returns) If you do not understand what log10 means, you may have to google

v. Calculate sin of pi c. Give each task a good description and print it. For example, this may be one of the outputs:

'The value of 10 times pi is: 31.41592653589793' d. Run your code to make sure it works and actually prints. e. Submit the ‘math_practice_yourlastname.py’ to Blackboard.

https://en.wikipedia.org/wiki/E_(mathematical_constant)
Problem 3 -- String Formatting, str.format() method

Objectives ● Learn about python’s formatting: str.format() ● Jupyter Notebook:

you may find it necessary to learn some basic navigation commands or tricks for Jupyter Notebook, to make things easy. For example, you may modify a line on top, but want to re-run the next 10 lines. Google “jupyter notebook hotkeys” to learn more.

Description Go through the description and examples on https://www.digitalocean.com/community/tutorials/how-to-use-string-formatters-in-python-3 Try the examples before reaching the section “​Padding Variable Substitutions​”. Try all the examples on Jupyter Notebook, you can change the code a bit and play with it, it’s easy to modify/erase/delete. In the end, please save the Jupyter Notebook file, name it ​‘string_formatting_.ipynb’​, (btw, what does the suffix ‘ipynb’ stands for? Google it if you’re curious). In your submitted ipynb file, each example should still play with the same functionality, but ​please use your own examples​, by changing the given code. Using existing examples from the webpage will result in point reduction. Submit file string_formatting_lastname.ipynb to Blackboard

https://www.digitalocean.com/community/tutorials/how-to-use-string-formatters-in-python-3

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Top Quality Assignments
Study Master
Smart Accountants
Chartered Accountant
Accounting & Finance Specialist
Writing Factory
Writer Writer Name Offer Chat
Top Quality Assignments

ONLINE

Top Quality Assignments

I am a PhD writer with 10 years of experience. I will be delivering high-quality, plagiarism-free work to you in the minimum amount of time. Waiting for your message.

$42 Chat With Writer
Study Master

ONLINE

Study Master

As an experienced writer, I have extensive experience in business writing, report writing, business profile writing, writing business reports and business plans for my clients.

$39 Chat With Writer
Smart Accountants

ONLINE

Smart Accountants

I am an elite class writer with more than 6 years of experience as an academic writer. I will provide you the 100 percent original and plagiarism-free content.

$18 Chat With Writer
Chartered Accountant

ONLINE

Chartered Accountant

I find your project quite stimulating and related to my profession. I can surely contribute you with your project.

$27 Chat With Writer
Accounting & Finance Specialist

ONLINE

Accounting & Finance Specialist

I am an elite class writer with more than 6 years of experience as an academic writer. I will provide you the 100 percent original and plagiarism-free content.

$49 Chat With Writer
Writing Factory

ONLINE

Writing Factory

I have done dissertations, thesis, reports related to these topics, and I cover all the CHAPTERS accordingly and provide proper updates on the project.

$50 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Manager's hot seat: working in teams: cross functional dysfunction - Case Study Paper - Under armour financial report 2017 - Mark 8 29 worksheet gcu - Comp xm exam excel spreadsheet - Map of mega cities - Use the laws of exponents to simplify - Organizational strategy healthcare - Like water for chocolate chapter 3 summary - Roy barrows builder loughborough - Pure substance vs mixture - Due Tonight by 10 pm - The difference between scientific theory and law - Cybersecurity - Financial Management - Annual Report Analysis. - Strategic audit report example - Disaster recovery plan team roles - Critical Appraisal of Jean Watson's Theory of Human caring - My talk pretty one day - Calculate the ratio of effusion rates for ar and kr - 10k resistor colour code - Assignment#1 - Ambrose avenue group practice - Use the position command to display the layout dialog box - Coopers extra stout dan murphy's - Ancient history historical investigation topics - Nsw health neurovascular observations chart - Let your light shine theme - Leadership styles directive participative and free rein - Mod 1 CR Path - Wrongful conviction - Research Report - Research Proposal - .I need 300 words 3 questions each Question need (100 words ) - Knoll manufacturing lends its supplier - The new coningsby surgery - Five pillars of sustainable change - Barwon heads riverside camping - Lisel mueller curriculum vitae - Rc airplane restraint system - What's the difference between volume and capacity - Toyota recall crisis management case study - Rams direct debit form - St chads court birmingham - Flvs earth space science answers - Chapter Application - Risk management - JUST FOR MARTHA 92 - Immediate and long term advantages and disadvantages that the UK will face as well as the effects within the EU from Brexit - Homework movie download - Gloria is a tax accountant who is very busy - Verbal comprehension index score - When a new manager stumbles who's at fault - Campus fitness center excel - Steel beam deflection tables - Econometrics - Romeo and juliet scenes in order - Svedka how to pronounce - The outsiders full novel movie - Who are the johnsons in a raisin in the sun - Suppose that there are 10 million workers in canada - Week 1 Lab Assignment - Phoenix affirmations study guide - I HUMAN case study - Skillion roof span tables australia - How to calibrate orp meter - Research Paper - Develop Your Own Personal Mission Statement - Adlerian psychology birth order - How many entries in a page table - The color of water chapter 4 - Bend it like beckham film study - Cics transaction gateway information center - Capstone assignment - Fat sick and nearly dead discussion questions - Cinahl database gcu - Populist Revolt Assignment - The cliche kid poem analysis - Capital allocation line equation - RUA : analyzing published research - Athena building teesside university - 750 ml to l - The company uses a perpetual inventory system - Pillow pets big w - Columbine shooting pictures gore - Cleveland clinic growth strategy 2012 - Pros and cons of behavioural approach - What is cash over and short - Students and mobile phones essay - A project manager has compiled a list of major activities - Haribo nederland b v - Swot analysis panera - During its first year of operations the mccollum corporation - The pulmonary semilunar valve permits flow from - Mini Paper1 - Main rules of badminton - Module 07 Quiz - Function of a triple beam balance - Proscenium arch stage diagram - What is a small scale research project - Module 10 Post-Lab Quiz