<< Chapter < Page Chapter >> Page >
Figure 33 . Question 9 possible output.
Trying: divide(1,3)Expecting: 0.3333333333333333ok 1 items had no tests:__main__.divide 1 items passed all tests:1 tests in __main__ 1 tests in 2 items.1 passed and 0 failed. Test passed.

Go to answer 9

Figure index

  • Figure 1 . Question 1 test code named Py1359_1720r_01.txt.
  • Figure 2 . Question 1 execution command.
  • Figure 3 . Question 1 possible output.
  • Figure 4 . Question 1 actual output.
  • Figure 5 . Question 2 test code named Py1359_1720r_02.txt.
  • Figure 6 . Question 2 execution command.
  • Figure 7 . Question 2 possible output.
  • Figure 8 . Question 2 actual output.
  • Figure 9 . Question 3 Python module named Py1359_1720r_03.py.
  • Figure 10 . Question 3 test code named Py1359_1720r_03.txt.
  • Figure 11 . Question 3 execution command.
  • Figure 12 . Question 3 possible output.
  • Figure 13 . Question 4 Python module named Py1359_1720r_04.py.
  • Figure 14 . Question 4 execution command.
  • Figure 15 . Question 4 possible output.
  • Figure 16 . Question 5 Python module named Py1359_1720r_05.py.
  • Figure 17 . Question 5 execution command.
  • Figure 18 . Question 5 possible output.
  • Figure 19 . Question 6 Python module named Py1359_1720r_06.py.
  • Figure 20 . Question 6 execution command.
  • Figure 21 . Question 6 possible output.
  • Figure 22 . Question 7 Python module named Py1359_1720r_07_runner.py.
  • Figure 23 . Question 7 Python module named Py1359_1720r_07.py.
  • Figure 24 . Question 7 execution command.
  • Figure 25 . Question 7 test code named Py1359_1720r_07.txt.
  • Figure 26 . Question 7 possible output.
  • Figure 27 . Question 8 Python module named Py1359_1720r_08.py.
  • Figure 28 . Question 8 test code named Py1359_1720r_08.txt.
  • Figure 29 . Question 8 execution command.
  • Figure 30 . Question 8 possible output.
  • Figure 31 . Question 9 Python module named Py1359_1720r_09.py.
  • Figure 32 . Question 9 execution command.
  • Figure 33 . Question 9 possible output.
  • Figure 34 . Question 9 actual output.

What is the meaning of the following two images?

These images were inserted here simply to insert some space between the questions and the answers to keep them from being visible on the screen at thesame time.

Spacer image of a rabbit and a penguin.

This image was also inserted for the purpose of inserting space between the questions and the answers.

Spacer image of a penguin and some houses.

Answers

Answer 9

False. The actual output is shown in Figure 34 . This question was included topoint out that testing floating point results can be problematic. Many floating point values are simply estimates. Although this example was purposely caused tofail, a given floating point computation may not produce exactly the same results on different platforms. Therefore a test that specifies a given floatingpoint result may pass on one platform and fail on a different platform. The Python Standard Library -- 26.2 doctest -- Test interactive Python examples provides some suggestions for dealing with this issue.

Figure 34 . Question 9 actual output.
Trying: divide(1,3)Expecting: 0.333333********************************************************************** File "Py1359_1720r_09.py", line 4, in __main__Failed example: divide(1,3)Expected: 0.333333Got: 0.33333333333333331 items had no tests: __main__.divide********************************************************************** 1 items had failures:1 of 1 in __main__ 1 tests in 2 items.0 passed and 1 failed. ***Test Failed*** 1 failures.

Questions & Answers

what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
Jyoti Reply
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
LITNING Reply
what is a peer
LITNING Reply
What is meant by 'nano scale'?
LITNING Reply
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
Adin
why?
Adin
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
research.net
kanaga
sciencedirect big data base
Ernesto
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!





Source:  OpenStax, Itse 1359 introduction to scripting languages: python. OpenStax CNX. Jan 22, 2016 Download for free at https://legacy.cnx.org/content/col11713/1.32
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Itse 1359 introduction to scripting languages: python' conversation and receive update notifications?

Ask