(m,a,b int mainol whilettrue) break system PAUSE return EXTT SUCCESS On one comp
ID: 3755182 • Letter: #
Question
(m,a,b int mainol whilettrue) break system PAUSE return EXTT SUCCESS On one compiler, when I ran the program, I got the following result: 65537 131073 a. Question: The output is slearty incerrest. Prove it. (10 points) 362.04 b. Here is a Python version of the same progam from math import sqrt def get numsn) a-n610 return a b # Here is the "main" program i=1 while True: a,b-get-nums(i*) ifa%2-1 and b%2 = 1: break print(i,i i, sqrt(i i) Question: When I ran the Python version the program didn't seem to terminate. Explain exactly why this is so. (Hint-it's not because Python is slower thanC+) (10 points)Explanation / Answer
In C++, we have datatypes like int, float, double, long, etc....we must and should need to use it, In python we have datatypes but it's optional, whenver we need.
According these constraints, In C++, 11/5 = 2, but in python we will get 2.5.
Let me know if you have any clarifications. Thank you...
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.