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...
icon
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
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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…
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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY