You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We start off with both methods making sure the input number is less then or equal to one. Then it redirects down to see if the number comes back as false. Once checked with i to see if the number can be divided by one its checked through with are % operator. Once are loop is complete if it tracks no false numbers then it'll return true.
32
+
33
+
34
+
## Differences
35
+
* Both functions are called differently (`java: system.out.print``Python print`)
36
+
37
+
* Both languages import math differently (`java: import java.lang.Math`; `Python: import math`)
38
+
## Similarities
39
+
* Both languages use `math.sqrt` equally to find the square root of the number. (well if you wanna be technical "java" has it start with a capital M but come on man.)
40
+
41
+
* In both methods Java and Python still use if statements to make choices in the code.
42
+
"Used Ai to give me code prompts of python and java"
0 commit comments