Computer Networking: A Top-Down Approach (7th Edition)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
Question
Explain what is the python doing
Transcribed Image Text:6. A scientist studying the universe has written the Python code below:
from pylab import *
def rate (z):
A = = 0.6
B = 0.5
C =
9.4
zdash =
return (zdash)
A*exp(-z/C) B*Z
to = 0
ZO = float (input("Please enter initial value: "))
float (input ("Please enter final time: "))
time_end =
number_of_steps
20
time_step =
=
time_end/number_of_steps
z = zeros(int (number_of_steps+1))
t = zeros(int (number_of_steps+1))
z [0]
zo
t [0]
= to
i = 0
print (i,z[i])
while i < number_of_steps:
i = i + 1
t[i]
z [i]
=
t[i-1]+time_step
=
z [i-1]+time_step*rate (z[i-1])
print (i, z[i])
The scientist knows that you have just finished SCIE1000, and so emails it to you to get some
advice. You run it, and enter two numbers. It gives the following output:
Please enter initial value: 0.1
Please enter final time: 10
0 0.1
1 0.3718254266066964
2 0.567233937130043
Transcribed Image Text:3 0.7078576294083201
4 0.8091316697378195
5 0.8821055956118914
6 0.9347074436372816
7 0.9726346885043051
8 0.9999864581494113
9 1.0197143082402373
10 1.033944716658461
11 1.0442103586631264
12 1.0516162493108738
13 1.0569592427060288
14 1.0608140584976962
15 1.063595250817454
16 1.065601867742315
17 1.067049646798249
18 1.0680942305349759
19 1.0688479096897523
20 1.069391699903605
Expert Solution
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
Step by stepSolved in 5 steps with 5 images
Knowledge Booster
Background pattern image
Similar questions
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Text book imageComputer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONText book imageComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceText book imageNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Text book imageConcepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningText book imagePrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationText book imageSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
Text book image
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Text book image
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Text book image
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Text book image
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Text book image
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Text book image
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY