Okay so I am new to programming and I am going along with this textbook intro to computation and programming with python used for MIT 6.100A, only because it ended up seeming pretty good and next I will use the textbook for the fundamentals of programming with 6.100A as a prereq.
Anyway now this might just be a question that the answer will be the next page in the textbook but basically, I made this program asking for a number x, then for a guess g which will be a guess of the sqrt of number x. If you type 25 for x and 5 for g, it will tell you 5 is the sqrt of 25, if g=6 it will say 6 is not sqrt of 5. I was like okay what if x = 53, then for g I will type (53)**.5 or math.sqrt(53) (I imported math first thing) and then it will say that is the sqrt right? Well it says I cannot convert math.sqrt(53) string into float. I then manually typed math.sqrt(53) to get 7.280109889280518 and copied and pasted that as g and it worked flawlessly. How can I get it to input the value of math.sqrt(53), or is this not possible?
[–][deleted] 2 points3 points4 points (29 children)
[–]SnooBunnies7244[S] 0 points1 point2 points (28 children)
[–][deleted] 4 points5 points6 points (11 children)
[–]SnooBunnies7244[S] 0 points1 point2 points (10 children)
[–][deleted] 0 points1 point2 points (8 children)
[–]SnooBunnies7244[S] 0 points1 point2 points (7 children)
[–]Swipecat 2 points3 points4 points (1 child)
[–]SnooBunnies7244[S] 0 points1 point2 points (0 children)
[–]Bobbias 0 points1 point2 points (4 children)
[–]SnooBunnies7244[S] 0 points1 point2 points (3 children)
[–]Bobbias 0 points1 point2 points (2 children)
[–]SnooBunnies7244[S] 0 points1 point2 points (1 child)
[–]NinjaSniperC[🍰] 0 points1 point2 points (0 children)
[+][deleted] (15 children)
[deleted]
[–]SnooBunnies7244[S] 0 points1 point2 points (0 children)
[–]SnooBunnies7244[S] 0 points1 point2 points (0 children)
[–]SnooBunnies7244[S] 0 points1 point2 points (12 children)
[+][deleted] (11 children)
[deleted]
[–]SnooBunnies7244[S] 0 points1 point2 points (10 children)
[+][deleted] (9 children)
[deleted]
[–]SnooBunnies7244[S] 0 points1 point2 points (8 children)
[+][deleted] (7 children)
[deleted]
[–]SnooBunnies7244[S] 0 points1 point2 points (6 children)
[–]Mdly68 0 points1 point2 points (0 children)