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

Business letter asking for information - Potential energy 1 2kx 2 - Prince sports inc case study - Writing a case study - How is pleasantville a dystopia - Paper - Wch lottery draw date - Perry barr advanced cards - Alexandra nechita most expensive painting - 1x1 rib vs 2x2 rib - Which one of the following statements best describes group behavior - Woodlands junior tudor food - Pluckers fire in the hole scoville units - Restricted electrical licence training sa - Density of water in lbm ft3 - Bioethics PHI324 - The zaf radiator company uses a normal - Tst 102 sraw test plan - Iodine clock reaction experiment lab report - Caged bird and free bird - Management principles for health professionals answers - The big short - How to find the class limits in a frequency distribution - Training and Development in Small Businesses - Discussion - Papi lights full form - Earth's magnetic field physics lab report - Financial information is presented below operating expenses - Https theconnection sirva com agent training eld eld - Business studies syllabus hsc - Solid waste management seminar - Foundations of nursing research - Pc unit 5 db deliver in 12hrsp - Journal of inequalities in pure and applied mathematics - How to use stride threat model - Postcode gisborne new zealand - A force-coercion strategy for change involves the use of - Organic Chemistry Lab 1 - Experiment 3A: Crystalistalization - American optical corporation provides a variety of share based - Goldfeld quandt test formula - Biological basis of behavior homework answers - Julie and julia movie worksheet - Age of innocence narrator - Gios pizza mount barker - The contorted realm map - The all or none law - Martinez owns an asset that cost 87000 - Communication Ethics Question - Movie review and queation answer assignment(due on 27 hours) - China noah corporation mini case - My back office worldventures - Fiesta st intercooler install - Cmgt 5 - Ink chromatography lab answer key - Alice 3 free download - Organization leadership 7 - A purely competitive firm finds that the market price for its product is $20 - What cultural conflicts emerged in the 1990s - Week 3 - Alcohol Abuse and Distracted Driving Discussion - Compare and Contrast Essay - Company karma hummel - Daniel gilbert reporting live from tomorrow summary - Precis writing exercises with answers - Journal - Jack wills interview questions - Promotions and Product life cycle - Binary to decimal quiz - PROJECT MANAGEMENT ASSIGNMENT - Essay - 8 paged paper - Jb hi fi receipts - Popped secret the mysterious origin of corn answer sheet - Gas laws interactive lab - Discussion - Select a company they are interested in analyzing - Qual 6 - A reason that muscle twitches become progressively stronger in treppe is - Johnson theory of nursing ppt - Capsim human resources - School leaving age victoria - El niño quiere un elefante de peluche. - Family Studies- Module 7 Reflection Paper - How many chromosomes do blue whales have - Exaggerated traits and breeding success in widowbirds answer key - Adolphe braun virginia oldoini - Paper - Point loma nazarene university essay prompt - Why should a foreign marketer study economic development - Lin corporation has a single product - Can beta be negative - Seven ages of man explanation - Service management & MARKETING - Dob in a tax cheat - Carl's jr menu prices 2019 - Mcgraw hill marketing simulation answers - Why nice guys finish last by julia serano - Goldhawks scooter club liverpool - Crue company had the following transactions - Heating curve of water lab answer key - Mri pre screening questionnaire