网上电玩

IT培訓網| | | | | | | |
|
400-650-7353

精品課程

您所在的位置:首頁 > 大學生就業 > 【實習報告】Python實訓報告

【實習報告】Python實訓報告

一、專業實習內容

1)python网上电玩基礎語法,數據類型及其操作,函數的語法結構

网上电玩2)yichangchuli,wenjiancaozuo

网上电玩3)matplotlibhuatugongneng

网上电玩4)wujianduxuexisuanfa k-meanssuanfa jianduxuexisuanfaknnsuanfa

5)Python面向對象設計和爬蟲

二、具體實習內容

网上电玩1)pythonjichuyufa,shujuleixingjiqicaozuo:zhuyaoxuexijichuyufa:fenzhijiegou,xunhuanjiegouyuju,yuanzu,shuzu,zidiandengcunchujiegoudejichuyufahexianghuzhuanhua,hehanshudeyufajiegou:

网上电玩name='yangman';

网上电玩str1='zhongguogaotiebeiwaijieyuweidangdaizhongguode“xinsidafaming”zhiyi(xinsidafamingbaokuo:gaotie,saomazhifu,gongxiangdanche,wangshanggouwu),juxi,zhongguogaotie-fuxinghaomuqianzuigaoshisuwei350gonglimeixiaoshi,5nianzhineijiangtisu30%dadao()gonglimeixiaoshi,yigengkuaidesuduzhulizhongguojingji。xinhuashejizhe-()';

网上电玩a=str1.find("zuigaoshisuwei")

网上电玩b=str1.find("gonglimeixiaoshi")

网上电玩tisu=str1.find("tisu")

tisu+=3;

dadao=str1.find("dadao")

网上电玩jizhe=str1.find("jizhe-(")

c=a+5

网上电玩currentspeed =int(str1[c:b])

网上电玩currentrate=int(str1[tisu-1:dadao-1])

网上电玩currentrate=currentrate/100;

newspeend=currentspeed+currentspeed*currentrate;

newspeed=str(newspeend)

str2=list(str1);

网上电玩str2.(dadao+3,newspeed)

str2.(jizhe+5,name)

greatchina=''.join(str2)

网上电玩print(greatchina)

网上电玩2)yichangchulihewenjianchuli:

zhuyaoxuexileyichangchulidejichuyufa,heshezhiyichangchulideyuanze,wenjiandeduxie

def fun_error():

print("qingzhongxinshuru,ningangcaishurudeshengfenbucunzai")

网上电玩def fun_error2():

print("suancuole")

try:

prove['guangxi']

网上电玩except keyerror:

fun_error()

try:

print(1/0)

except zerodivisionerror:

网上电玩fun_error2()

网上电玩fun_error2()

f=open("ni.txt",'r',encoding='utf-8')

data=f.read()

网上电玩print(data)

f.write("huanying")

f.close()

3)matplotlibhuatushixian:

网上电玩zhuyaoxuexijiangshujuzhanshiweisandiantuhezhexiantudefangfa:

网上电玩import matplotlib.pyplot as plt

网上电玩import numpy as np

plt.rcparams['font.sans-serif'] = 'simhei'

plt.rcparams['axes.unicode_minus'] = false

p1=plt.figure()

plt.title("yangman+2015080332096+1949,1956,1960niandaichengkeshujufenxi")

plt.xlabel("yuefen")

plt.ylabel("renshu")

plt.xlim(1,13) # shedingxzhoufanwei

plt.ylim((100, 650))

网上电玩plt.xticks(np.arange(1, 13, step=1))

plt.yticks(np.arange(0, 650, step=50))

网上电玩year_1949=(112,118,132,129,121,135,148,148,136,119,104,118)

year_1956=(284,277,317,313,318,313,318,374,413,405,355,306)

year_1960=(417,391,419,461,472,535,622,606,508,461,390,432)

网上电玩plt.plot(year_1949,color='red',linewidth=4.0,linestyle='-.',marker='*',markersize=10)

plt.plot(year_1956,color='blue',linewidth=3.0,linestyle='--',marker='s',markersize=10)

网上电玩plt.plot(year_1960,color='yellow',linewidth=2.0,linestyle=':',marker='^',markersize=10)

plt.legend(['1949niandai','1956niandai','1960niandai'])

plt.savefig('d:/home1.png')

plt.show()

4)k-meanssuanfa hek-nnsuanfa

zhuyaoxuexilefeijianduxuexihejianduxuexizhonglianggezuijichudesuanfa,lejielesuanfadebianchengsixianghedongshoushixianlesuanfa:

k-meanssuanfa:

import matplotlib.pyplot as plt

import numpy as np

网上电玩import random

from numpy import *

网上电玩import math

#chushitu

网上电玩plt.rcparams['font.sans-serif'] = 'simhei'

网上电玩plt.rcparams['axes.unicode_minus'] = false

p1=plt.figure(figsize=(8,6),dpi=80)

网上电玩plt.xlabel("pingjunxiaofeizhouqi")

plt.ylabel("meicixiaofeijine")

网上电玩plt.xlim(1,100) # shedingxzhoufanwei

plt.ylim((0, 800))

网上电玩# plt.xticks(np.arange(1, 100, step=1))

# plt.yticks(np.arange(0, 800, step=10))

x=[10,13,17,67,35,1,10,12,8,1,32,3,90,1,16,31,25]

y=[317,147,172,194,789,190,281,142,186,226,287,499,181,172,190,271,382]

plt.scatter(x, y)

#canshuguiding

k_number=3

x_random=[]

y_random=[]

dic=[]

网上电玩result_x_num0=[]

result_y_num0=[]

网上电玩result_x_num1=[]

result_y_num1=[]

result_x_num2=[]

result_y_num2=[]

网上电玩#suijishengchengleijuzhongxindianzuobiao

for i in range (0,k_number):

random_kid_x=random.randint(1,100)

x_random.append(random_kid_x)

random_kid_y=random.randint(0,800)

网上电玩y_random.append(random_kid_y)

x_randomz_first=x_random#cunfangdiyicijuleizhongxindexzuobiao

网上电玩y_random_first=y_random#cunfangdiyicijuleizhongxindeyzuobiao

x_randomz_second=[0,0,0]#cunfangdiercijuleizhongxindexzuobiao

y_random_second=[0,0,0]#cunfangdiercijuleizhongxindeyzuobiao

result_x_num0 = []#cunfang0haoleidexdezuobiao

result_y_num0 = []#cunfang0haoleideydezuobiao

result_x_num1 = []#cunfang1haoleidexdezuobiao

网上电玩result_y_num1 = []#cunfang1haoleideydezuobiao

result_x_num2 = []#cunfang2haoleidexdezuobiao

result_y_num2 = []#cunfang2haoleideydezuobiao

result_x=0

result_y=0

相關推薦

【Python培訓 】從小白到大咖 打造Python精英人才

課程好禮申請領取

网上电玩游戏

官方微信

掃描上方二維碼或者手動搜索ujiuye,關注【网上电玩 】,每日推送行業資訊、干貨資料、熱門話題、招聘信息和求職攻略网上电玩,還有不定期的優惠活動一手發布!

>>本文地址:
注:本站稿件未經許可不得轉載,轉載請保留出處及源文件地址。

相關推薦

趁年輕 學門技術充個電
0元
入學
30天免費試學, 3000
直減優惠
立即
搶占
2周
特訓
價值299的特訓營課程,
9.9元搶購
立即
搶購
80G
資源包
IT行業11類熱門崗位全套資源包
立即
領取
課程資料、活動優惠 領取通道
 
 
  • 返回頂部
电玩_电玩捕鱼_电玩捕鱼城 电玩捕鱼_电玩捕鱼游戏_电玩城捕鱼游戏 电玩城捕鱼_电玩城游戏_电玩捕鱼游戏 电玩游戏大厅 电玩游戏大厅