发布时间:2015-07-31 17:03:07
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"># 定义函数 def add(x, y): """相加""" return x + y def subtract(x, y): """相减""" return x - y def multiply(x, y): """相乘""" .........【阅读全文】
发布时间:2015-07-31 16:55:41
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># 定义函数 </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#000080;font-weight:bold;">def </span>lcm(x, y): </pre>.........【阅读全文】
发布时间:2015-07-30 19:58:47
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># 用户输入字符 </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;">c = <span style="color:#000080;">input</span>(<span style="color:#008080;font.........【阅读全文】
发布时间:2015-07-30 19:56:10
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># -*- coding: UTF-8 -*- </span><span style="color:#808080;font-style:italic;"> </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style=.........【阅读全文】
发布时间:2015-07-30 19:50:04
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># -*- coding: UTF-8 -*- </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># Python 检测用户输入.........【阅读全文】
发布时间:2015-07-30 19:26:35
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;">#Fibonacci </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;">a,b=<span style="color:#0000ff;">0</span>,<span style="color:#0000ff;">1 </s.........【阅读全文】
发布时间:2015-07-25 16:33:34
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># -*- coding: UTF-8 -*- </span><span style="color:#808080;font-style:italic;"> </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style=.........【阅读全文】
发布时间:2015-07-25 14:38:34
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># -*- coding: UTF-8 -*- </span><span style="color:#808080;font-style:italic;"> </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style=.........【阅读全文】
发布时间:2015-07-24 14:34:16
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"># -*- coding: UTF-8 -*-# Python 程序用于检测用户输入的数字是否为质素 num = int(input("请输入一个数字: ")) # 质数大于 1 if num > 1: # 查看因子 for i in range(2,num): .........【阅读全文】
发布时间:2015-07-24 14:20:07
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="background-color:#e4e4ff;">print</span>(<span style="color:#000080;">max</span>(<span style="color:#0000ff;">1</span>, <span style="color:#0000ff;">2</span>)) </pre><pre style="background-color:#FFFFFF;font-fam.........【阅读全文】
发布时间:2015-07-24 14:16:16
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># -*- coding: UTF-8 -*- </span><span style="color:#808080;font-style:italic;"> </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;">year = <span .........【阅读全文】
发布时间:2015-07-24 14:07:54
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># -*- coding: UTF-8 -*- </span><span style="color:#808080;font-style:italic;"> </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style=.........【阅读全文】
发布时间:2015-07-22 16:14:24
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"># -*- coding: UTF-8 -*- # Filename :判断字符串 def is_number(s): try: float(s) return True except Va.........【阅读全文】
发布时间:2015-07-21 13:57:15
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># -*- coding: UTF-8 -*- </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># 用户输入数字 </span.........【阅读全文】
发布时间:2015-07-14 20:15:02
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># -*- coding: UTF-8 -*- </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># 用户输入 </span><sp.........【阅读全文】
发布时间:2015-07-07 19:26:45
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># -*- coding: UTF-8 -*- </span><span style="color:#808080;font-style:italic;"> </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style=.........【阅读全文】
发布时间:2015-07-06 20:42:23
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># -*- coding: UTF-8 -*- </span><span style="color:#808080;font-style:italic;"> </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style=.........【阅读全文】
发布时间:2015-07-06 17:32:29
我们可以将系统的认证方式从keyboard-interactive修改为password,并让Xshell/SecureCRT等工具保存密码,以节省连接Linux系统的时间。具体的操作步骤如下:<br />1、修改/etc/ssh/sshd_config文件,找到如下参数,将其值修改为“yes”,同时取消该行注释。<br /> #PasswordAuthentication no<br />&n.........【阅读全文】