摘要:
最近在做Python的课程作业,遇到一个问题,描述如下: 使用Python内置的Tkinter模块进行GUI编程 给一个按钮(或菜单)绑定事件,打开一个新窗口,新窗口内有Entry若干,通过textvariable选项绑定变量,用于获取用户输入,但通过控制台输出(或方法参数传递)检查得知,程序获取到 阅读全文
摘要:
CSS的定位机制 1.普通流(标准流) 默认状态,元素自动从左往右,从上往下排列 块元素的特征: 独占一行 可以设置宽高 如果不设置宽度,宽度默认为容器的100% 常见的块元素:div p h1-h6 ul ol li dl dt d 行内元素的特征: 与其他元素同行显示 不可以设置宽和高 宽和高就 阅读全文
摘要:
Reversing a List If you have time, you can try to write a function which will reverse a list recursively, according to thefollowing algorithm:1. rever 阅读全文
摘要:
Programming 1.Analysing a Text File Look at the file xian_info.txt which is like this: First line is a country. Second line integer is a population. T 阅读全文
摘要:
Programming Create a Class Student which should have the following information:Parameters passed to __init__ when an instance of the class is created: 阅读全文
摘要:
#5.1 major = 'Software Engineering' print("Is major =='Software Engineering'? I predict True.") print(major=='Software Engineering') print("Is major =='Software Engineering'? I predict False.") print( 阅读全文
摘要:
#4.1 pizzas = ['KFC','MDL','DKS'] '''1''' for pizza in pizzas: print(pizza); '''2''' for pizza in pizzas: print("I like "+ pizza +" pizza!") '''3''' print("My favourite pizza is K 阅读全文
摘要:
一、OSI7层模型协议 二、TCP/IP四层协议模型(五层) 1.网络接入层 网络接入层与OSI参考模型中的物理层和数据链路层相对应,它负责监视数据在主机和网络之间的交换。事实上,TCP/IP本身并未定义该层的协议,而由参与互连的各网络使用自己的物理层和数据链路层协议,然后与TCP/IP的网络接入层 阅读全文
摘要:
#3.1 names=['lpr','tjl','gnl','by','dqy']; print(names[0]); print(names[1]); print(names[2]); print(names[3]); print(names[4]); #3.2 print(names[0]+",Hello!"); print(names[1]+",Hello!"); print(names... 阅读全文
摘要:
#2.1 print("Hello world!"); #2.2 message="Hello,Python!"; print(message); #2.3 name="tian jiale"; print(name+",would you like to learn some Python today?"); #2.4 #小写 print(name.lower()+",would you lik 阅读全文