Hello, I am having trouble having this code run on replit. I am using python and I am unsure why it is not running while on campus it worked fine. Any help in havin this code run would be greatly appriecated.
Hello, I am having trouble having this code run on replit. I am using python and I am unsure why it is not running while on campus it worked fine. Any help in havin this code run would be greatly appriecated.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Hello, I am having trouble having this code run on replit. I am using python and I am unsure why it is not running while on campus it worked fine. Any help in havin this code run would be greatly appriecated.
![8
DI
☺ >
Files
main.py
Packager files
poetry.lock
pyproject.toml
main.py x
356 def db_add(a,p,d,x,y):
357
358
359
360
361
362 ▼
363
364
365
366
367
368
369
370
371 ▼
372
373
374
375
376
377
378
379
380
381
382 def main():
383
384
385
386
387
388
389
390
391
392
+
d = bin(d)
x1 = x
y1 = y
P = []
P.append( [x1, y1])
for i in range(3, len(d)):
s0 (2 y1) % p
s1 = eea (p, s0)
s = ((3 * (x1**2) + a ) * s1) % p
x3 = ((s**2)
2 * x1) % p
y3 = (s* (x1 -x3) -y1) % p
x1 = x3
y1 = y3
P.append([x1, y1])
if (d[i:i + 1]
S0 = (x1 x) % p
s1 = eea
(p, s0)
s = ((y1 - y)*s1)
x3 = ((s ** 2)
y3 (s* (x1
x1 = x3
return p
393
394
395
396 main()
a = 1217
b = 1961
Р 2351
== '1'):
-
y1 = y3
P.append([x1, y1])
#Alice
ad = 25
x, y = 0,457
P = db_add(a,p, ad,x,y)
print (P)
bd = 16
% p
x1 -x) % p
x3) y1) %
-
X, y = 917, 725
P = db_add(a, p, bd, x, y)
print (P)
р
Console X
Shell x +
Traceback (most recent call last):
File "main.py", line 396, in <module>
main()
File "main.py", line 389, in main
P = db_add(a,p,ad,x,y)
File "main.py", line 364, in db_add
s1 = enumerate(p,s0)
TypeError: 'int' object is not iterable](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F913a0921-d398-48e9-845b-58c3dce12c9b%2F14501c39-5f53-4f1f-b27a-10c50813024d%2Fp00a5bm_processed.png&w=3840&q=75)
Transcribed Image Text:8
DI
☺ >
Files
main.py
Packager files
poetry.lock
pyproject.toml
main.py x
356 def db_add(a,p,d,x,y):
357
358
359
360
361
362 ▼
363
364
365
366
367
368
369
370
371 ▼
372
373
374
375
376
377
378
379
380
381
382 def main():
383
384
385
386
387
388
389
390
391
392
+
d = bin(d)
x1 = x
y1 = y
P = []
P.append( [x1, y1])
for i in range(3, len(d)):
s0 (2 y1) % p
s1 = eea (p, s0)
s = ((3 * (x1**2) + a ) * s1) % p
x3 = ((s**2)
2 * x1) % p
y3 = (s* (x1 -x3) -y1) % p
x1 = x3
y1 = y3
P.append([x1, y1])
if (d[i:i + 1]
S0 = (x1 x) % p
s1 = eea
(p, s0)
s = ((y1 - y)*s1)
x3 = ((s ** 2)
y3 (s* (x1
x1 = x3
return p
393
394
395
396 main()
a = 1217
b = 1961
Р 2351
== '1'):
-
y1 = y3
P.append([x1, y1])
#Alice
ad = 25
x, y = 0,457
P = db_add(a,p, ad,x,y)
print (P)
bd = 16
% p
x1 -x) % p
x3) y1) %
-
X, y = 917, 725
P = db_add(a, p, bd, x, y)
print (P)
р
Console X
Shell x +
Traceback (most recent call last):
File "main.py", line 396, in <module>
main()
File "main.py", line 389, in main
P = db_add(a,p,ad,x,y)
File "main.py", line 364, in db_add
s1 = enumerate(p,s0)
TypeError: 'int' object is not iterable
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY