二分的情况不同所输出的模板也不同列如下面两个题目 The Frog's Games 代码如下 //二分专练 #include <stdio.h> //lower_bound大于等于它的第一个数 #include <iostream> //upper_bound大于 它的第一个数 #include < ...
分类:
其他好文 时间:
2019-11-10 15:31:34
阅读次数:
76
习题1 判断用户的键盘输入内容: - 如果都是数字,则将该数字扩大10倍,然后打印显示 - 如果是字母,则在其后面增加"@python"后打印显示 - 其他情况则将输入的内容按原样显示 user_input = input('input something:') if user_input.isdi ...
分类:
其他好文 时间:
2019-11-09 00:07:15
阅读次数:
87
package test; import java.io.*; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; import java.util.zip.InflaterInput ...
分类:
其他好文 时间:
2019-11-08 23:58:21
阅读次数:
157
系统内置函数 1. 查看系统自带的函数 hive> show functions; 2. 显示自带的函数的用法 hive> desc function upper; 3. 详细显示自带的函数的用法 hive> desc function extended upper; 自定义函数 占位符! ...
分类:
其他好文 时间:
2019-11-07 13:11:24
阅读次数:
82
#include <stdio.h>/*当fathr = 0,20,...,300时,分别打印fahr华氏温度与celsius摄氏温度对照表*/main(){ float fahr,celsius; int lower,upper,step; lower = 0;/*温度表的下限*/ upper = ...
分类:
其他好文 时间:
2019-11-06 23:10:23
阅读次数:
112
需求:字符串忽略大小写搜索和替换 解决: 使用re.IGNORECASE 缺陷 解决: ...
分类:
其他好文 时间:
2019-11-05 21:40:07
阅读次数:
109
1.统计字符串的长度,按字节len(str) str := "hello北京" fmt.Println("str len=", len(str)) 2.字符串遍历,同时处理有中文的问题 r := []rune(str) str2 := "hello北京" r := []rune(str2) for ...
分类:
其他好文 时间:
2019-11-05 00:51:08
阅读次数:
106
一、字符串特有 1.upper() / .lower() 将字符串转化为大小写,得到结果是字符串 示例:将输入字符串进行小写比较方式1:check_code = 'AF1k'new_check_code = check_code.lower()print(new_check_code)code = ...
分类:
其他好文 时间:
2019-11-04 13:18:48
阅读次数:
79
一、改变大小写 word="hello world"1、字母全改成大写print(word.upper())2、字母全改成小写print(word.lower())3、字符串首字母改成大写print(word.title())二、合并字符串 Python使用加号(+ )来合并字符串。在这个示例中,我 ...
分类:
编程语言 时间:
2019-11-03 18:34:54
阅读次数:
102
习题1 编写函数,对单词中的字母实现下操作: 根据参数设置,将单词中的字母转化为大写或者小写 返回转化之后的单词 def convert(word, low=True): if low: return word.lower() else: return word.upper() w = "Physi ...
分类:
其他好文 时间:
2019-11-03 10:36:07
阅读次数:
83