Skip to content

Instantly share code, notes, and snippets.

Avatar

zhengfu Xuzhengfu

View GitHub Profile
@Xuzhengfu
Xuzhengfu / prime_num.py
Last active Aug 1, 2020
Zhengfu's assignment #2
View prime_num.py
from math import sqrt
from itertools import islice
def is_prime(num):
if num in (2, 3):
return True
for factor in range(2, int(sqrt(num)) + 1):
if num % factor == 0:
@Xuzhengfu
Xuzhengfu / zhengfu.py
Created Jul 19, 2020
Zhengfu's assignment #1
View zhengfu.py
import random
import requests
from time import sleep
from pypinyin import lazy_pinyin
from termcolor import colored
from simpleeval import simple_eval
class Bot:
You can’t perform that action at this time.