随笔分类 - Python
摘要:最近在做Python的课程作业,遇到一个问题,描述如下: 使用Python内置的Tkinter模块进行GUI编程 给一个按钮(或菜单)绑定事件,打开一个新窗口,新窗口内有Entry若干,通过textvariable选项绑定变量,用于获取用户输入,但通过控制台输出(或方法参数传递)检查得知,程序获取到
阅读全文
摘要: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
阅读全文
摘要:#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
阅读全文

浙公网安备 33010602011771号