学习 第7页
个人学习记录

Python作业:函数

公约数# 编写一个函数,该函数接收两个数字作为输入,并返回这两个数字的最大公约数。 def gcd(a, b): while b != 0: a, b = b, a % b return a num1 = int(input('请输入一个整数:')) num2 = i...
珊瑚海的头像-北梦の博客珊瑚海2年前
014114

3.18mysql五种表代码

create database petstore; use petstore; create table account ( userid char(6) not null , fullname varchar(10) not null ,     password varchar(20) not null ,     sex char(2) not...
X.蔡徐坤的头像-北梦の博客X.蔡徐坤1年前
01259

Python递归案例

把10不断处以2,直到不能除为止,打印每次的结果 def a(num): if num == 0: return 0 else: print(num) a(num // 2) a(10) 兔子数列 def f(month): if month < 3: return 1 else: return f(m...
北梦的头像-北梦の博客SVIP北梦2年前
011815
华中农业大学:   官网导航栏-北梦の博客

华中农业大学: 官网导航栏

<!DOCTYPE html> <html> <head> <meta charset='UTF-8'> <title>导航栏</title> <style type='text/css'> *{margin: 0; padding: 0;} body{font-siz...
珊瑚海的头像-北梦の博客珊瑚海2年前
01545

HTML定位

作业1 代码 <!DOCTYPE html> <html lang='en'> <head> <meta charset='UTF-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge'> <meta name='viewport' content='wid...
北梦的头像-北梦の博客SVIP北梦2年前
015110

html 太极图

<!DOCTYPE html> <html> <head> <meta charset='UTF-8'> <title></title> </head> <style> body{background-color: darkgray;} .taiji{ margi...
珊瑚海的头像-北梦の博客珊瑚海2年前
013610
CSS重难点-浮动与定位-北梦の博客

CSS重难点-浮动与定位

笔记 (1)display属性 设置标签在页面的显示方式,主要取值有: none 设置标签不在页面显示 block 设置标签以块状标签的形式在页面呈现 inline 设置标签以行内标签的形式在页面呈现 inline-block...
北梦的头像-北梦の博客SVIP北梦2年前
01262

Python求两数的最大公约数

import math while True: num1 = int(input('请输入第一个整数')) num2 = int(input('请输入第二个整数')) if num1 > num2: while num2 != 0: num1, num2 = num2, num1 % num2 print(num1) e...
珊瑚海的头像-北梦の博客珊瑚海2年前
012312

Python课案例:计票机制

y = {} x = [] print('输入quit表示选手成绩录入完毕') while True: name = input('输入选手名称: \n') if name == 'quit': break score = float(input('请输入选手票数: \n')) y[name] = score...
珊瑚海的头像-北梦の博客珊瑚海2年前
022113

Python上课笔记_20231204

1.计票机制 p = {} while True: xm = input('请输入选手姓名(输入0退出):') if xm == '0': break ps = int(input('请输入票数:')) p[xm] = ps items = p.items() li = [] for i in items: li.ap...