帮我对比分析一下Java和Python的语法特点，以markdown表格输出，并且分别使用它们写一段判断一个数是否是素数的代码|markdown|代码实例也要以markdown格式的代码块展示|

| 语言      | 语法特点 | 代码实例                                         |
|---------|--------|----------------------------------------------------------|
| Java    | 静态类型语言，强类型系统  | ```java
public class PrimeCheck {
    public static void main(String[] args) {
        int num = 29;
        boolean isPrime = true;
        for (int i = 2; i <= Math.sqrt(num); i++) {
            if (num % i == 0) {
                isPrime = false;
                break;
            }
        }
        System.out.println(num + " is prime: " + isPrime);
    }
}
``` |
| Python  | 动态类型语言，简洁优雅   | ```python
import math

num = 29
is_prime = True

for i in range(2, int(math.sqrt(num)) + 1):
    if num % i == 0:
        is_prime = False
        break

print(f"{num} is prime: {is_prime}")
``` |
user
| 语言      | 语法特点 | 代码实例                                         |
|---------|--------|----------------------------------------------------------|
| Java    | 静态类型语言，强类型系统  | ```java
public class PrimeCheck {
    public static void main(String[] args) {
        int num = 29;
        boolean isPrime = true;
        for (int i = 2; i <= Math.sqrt(num); i++) {
            if (num % i == 0) {
                isPrime = false;
                break;
            }
        }
        System.out.println(num + " is prime: " + isPrime);
    }
}
``` |
| Python  | 动态类型语言，简洁优雅   | ```python
import math

num = 29
is_prime = True

for i in range(2, int(math.sqrt(num)) + 1):
    if num % i == 0:
        is_prime = False
        break

print(f"{num} is prime: {is_prime}")
``` |
assistant