# python代码表达失恋_利用python程序浪漫安慰失恋妹纸

# -*- coding:utf-8 -*-

import sys

import math

import time

def frange(start, end, step=1.0):

if step > 0:

while start < end:

yield start

start += step

elif step < 0:

while start > end:

yield start

start += step

else:

raise ValueError('range() step must not be zero')

def f(x, y, z):

a = x*x + 9.0/4*y*y + z*z - 1

return a*a*a - x*x*z*z*z - 9.0/80*y*y*z*z*z

def h(x, z):

for y in frange(1.0, 0.0, -0.001):

if f(x, y, z) <= 0:

return y

return 0.0

def writefrang():

for z in frange(1.5, -1.5, -0.1):

for x in frange(-1.5, 1.5, 0.05):

v = f(x, 0, z)

if v <= 0:

y0 = h(x, z)

ny = 0.01

nx = h(x + ny, z) - y0

nz = h(x, z + ny) - y0

nd = 1.0/math.sqrt(nx*nx+ny*ny+nz*nz)

d = (nx + ny - nz)*nd*0.5 + 0.5

sys.stdout.write('.:-=+*#%@'[int(d*5)])

else:

sys.stdout.write(' ')

sys.stdout.write('n')

def writefrange1():

for y in frange(1.5, -1.5, -0.1):

for x in frange(-1.5, 1.5, 0.05):

z = x*x + y*y - 1

f = z*z*z - x*x*y*y*y

if f <= 0:

sys.stdout.write('*')

else:

sys.stdout.write(' ')

sys.stdout.write('n')

def start():

print "*"*80

def dee():

print "-"*80

myfile=open("word.txt","rb+")

for i in range(0,13):

print line[i]

time.sleep(3)

dee()

writefrange1()

#writefrang()

dee()

for i in range(13,174):</

• 0
点赞
• 1
收藏
觉得还不错? 一键收藏
• 0
评论
06-23 1545
09-20
07-21 95
03-08 283
07-10 1700
12-13 1677
06-25 227
12-10 124
12-16 3007

1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载，可以购买VIP、付费专栏及课程。