Python exercise 8 - Rock Paper Scissors

Exercise 8 - Rock Paper Scissors ''' Make a two-player Rock-Paper-Scissors game. (Hint: Ask for player plays (using input), compare them, print out a message of congratulations to the winner, and ask if the players want to start a new game) Remembe
分类: 其他 发布时间: 04-12 23:54 阅读次数: 0

Python exercise 9 - Guessing Game

Exercise 9 - Guessing Game ''' Generate a random number between 1 and 9 (including 1 and 9). Ask the user to guess the number, then tell them whether they guessed too low, too high, or exactly right. (Hint: remember to use the user input lessons fro
分类: 其他 发布时间: 04-12 23:53 阅读次数: 0

PYTHON Exercise 1 Input & Print

Exercise 1 - Input & Print ''' Exercise: Create a program that asks the user to enter their name and their age. Print out a message addressed to them that tells them the year that they will turn 100 years old. ''' Code: # code: name = input ('Pleas
分类: 其他 发布时间: 04-12 23:53 阅读次数: 0

Python exercise 2 - Odd or Even

Python exercise 2 - Odd or Even ''' Exercise 2 - Odd or Even Take a list, say for example this one: a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] and write a program that prints out all the elements of the list that are less than 5. Extras: Ins
分类: 其他 发布时间: 04-12 23:53 阅读次数: 0

Python exercise 10 - List Overlap Comprehensions

Python exercise 10 - List Overlap Comprehensions ''' This week’s exercise is going to be revisiting an old exercise (see Exercise 5), except require the solution in a different way. Take two lists, say for example these two: a = [1, 1, 2, 3, 5, 8,
分类: 其他 发布时间: 04-12 23:53 阅读次数: 0

Python exercise 11 - Check Primality Functions

Python exercise 11 - Check Primality Functions ''' Ask the user for a number and determine whether the number is prime or not. (For those who have forgotten, a prime number is a number that has no divisors.). You can (and should!) use your answer to
分类: 其他 发布时间: 04-12 23:52 阅读次数: 0

Python exercise 12 - List Ends

Python exercise 12 - List Ends ''' Write a program that takes a list of numbers (for example, a = [5, 10, 15, 20, 25]) and makes a new list of only the first and last elements of the given list. For practice, write this code inside a function. **Con
分类: 其他 发布时间: 04-12 23:52 阅读次数: 0

Python exercise 3 -list & lambda

Python exercise 3 -list & lambda Take a list, say for example this one: a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] and write a program that prints out all the elements of the list that are less than 5. Extras: Instead of print
分类: 其他 发布时间: 04-12 23:52 阅读次数: 0

Python exercise 4 - divisors

Python exercise 4 - divisors Create a program that asks the user for a number and then prints out a list of all the divisors of that number. (If you don’t know what a divisor is, it is a number that divides evenly into another number. For ex
分类: 其他 发布时间: 04-12 23:52 阅读次数: 0

Python exercise 5 - List Overlap

Python exercise 5 - List Overlap Take two lists, say for example these two: a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] and write a program that returns a list that contains only the elements that a
分类: 其他 发布时间: 04-12 23:51 阅读次数: 0

Python exercise 6 - string & list

Python exercise 6 - string & list Ask the user for a string and print out whether this string is a palindrome or not. (A palindrome is a string that reads the same forwards and backwards.) Code 1: a=str(input('Please enter a str: ')) l=len(a) x=0 f
分类: 其他 发布时间: 04-12 23:51 阅读次数: 0

虚拟键盘

造冰箱的大熊猫,本文在Microsoft Windows XP和Ubuntu 16.04上验证通过@cnblogs 2019/4/12 文中图片可通过点击鼠标右键查看大图 今天在笔记本上运行某个程序时,发现键盘方向键在该软件中处于“Scroll Lock”模式(不了解Scroll Lock的可参考这里)。但是看遍键盘上每个按键的大字小字图标,都没有找到Scroll Lock按键。半夜三更的也没地方去找外接键盘。最后想到了Windows自带的虚拟键盘。点击“Windows开始按钮>>所有程序>>
分类: 其他 发布时间: 04-12 23:51 阅读次数: 0

装饰器中的@functools.wraps的作用

def login_required(view_func): @functools.wraps(view_func) def wrapper(*args, **kwargs): ...... return view_func(*args,**kwargs) return wrapper 在wrapper上面使用这个装饰器可以让view_func.__name__或者view_func.__doc__访问的还是原先那个
分类: 其他 发布时间: 04-12 23:51 阅读次数: 0

Web项目容器集成ActiveMQ & SpringBoot整合ActiveMQ

  集成tomcat就是随项目启动而启动tomcat,最简单的方法就是监听器监听容器创建之后以Broker的方式启动ActiveMQ。 1.web项目中Broker启动的方式进行集成   在这里采用Listener监听ServletContext创建和销毁进行Broker的启动和销毁。 0.需要的jar包: 1.listener实现ServletContextListener接口 package cn.qlq.listener; import javax.servlet.ServletC
分类: 其他 发布时间: 04-12 23:51 阅读次数: 0

牛客小白月赛13 解题报告

暂时咕着,慢慢补...赛时几题先放上来 A 打个表即可 #include<bits/stdc++.h> using namespace std; int main() { long long n; scanf("%lld",&n); if(n & 1) puts("1"); else puts("-1"); } B 枚举端点,hash判断即可。 #include<bits/stdc++.h> using namespace std; typedef unsigned l
分类: 其他 发布时间: 04-12 23:51 阅读次数: 0

vue中vueRouter使用

首先需要安装依赖: 再定义: routes.js,配置路由规则: import Home from './components/Home' import Menu from './components/Menu' import Login from './components/Login' import Register from './components/Register' import Admin from './components/Admin' import Abo
分类: 其他 发布时间: 04-12 23:51 阅读次数: 0

06-验证码-基本功能实现

在Chrome控制台,将26位英文字母变成大写: 'qwertyuiopasdfghjklzxcvbnm'.toUpperCase() // "QWERTYUIOPASDFGHJKLZXCVBNM" 占位 alert('ok')
分类: 其他 发布时间: 04-12 23:51 阅读次数: 0

4.12

学习的第三天。学习时间比较零碎,所以知识的连接和运用还相当的有限。 <a href="目标网址" title="鼠标滑过显示的文本">链接显示的文本</a> 标签,类似于超链接。 <a href="目标网址" target="_blank">click here!</a>作用相同,只是创建了一个新网页来打开内容。<a>的内容有点丰富。 比如mailto 就是发送邮件,大致格式如上图所示。注意:如果mailto后面同时有多个参数的话,第一个参数必须以“?”开头,后面的参数每一个都以“&
分类: 其他 发布时间: 04-12 23:51 阅读次数: 0

powershell复制文件夹的文件

#分别定义源、目标文件夹,注意大小写敏感 $folder_a_path = "D:\Leishen\Source_Publish\api" $folder_b_path = "D:\Leishen\Test_Publish\api" #遍历源文件夹下所有文件 $folders_a = gci $folder_a_path -Recurse foreach ($folder_a in $folders_a) { #通过替换的方式,取目标文件的全路径名称 $b = $f
分类: 其他 发布时间: 04-12 23:51 阅读次数: 0

LG3187 [HNOI2007]最小矩形覆盖

题意 题目描述 给定一些点的坐标,要求求能够覆盖所有点的最小面积的矩形,输出所求矩形的面积和四个顶点坐标 输入输出格式 输入格式: 第一行为一个整数n(3<=n<=50000),从第2至第n+1行每行有两个浮点数,表示一个顶点的x和y坐标,不用科学计数法 输出格式: 第一行为一个浮点数,表示所求矩形的面积(精确到小数点后5位),接下来4行每行表示一个顶点坐标,要求第一行为y坐标最小的顶点,其后按逆时针输出顶点坐标.如果用相同y坐标,先输出最小x坐标的顶点 输入输出样例 输入样例#1: 复制 6
分类: 其他 发布时间: 04-12 23:51 阅读次数: 0