MySQL基本语法
前言
MySQL的注释: 单行注释: --或者# 多行注释: /**/
备注: [ ]表示可选择,可有可没有
分类
全称
说明
DDL
Data Definition Language
数据定义语言,用来定义数据库对象
DML
Data Manipulation Language
数据操作语言,用来对数据库表中的数据进行增删改
DQL
Data Query Language
数据查询语言,用于查询数据库中表的信息
DCL
Data Control Language
数据控制语言,用于创建数据库用户、控制数据库的访问权限
DDL
DDL:数据定义语言,用于对数据库中的数据对象的组成和结构进行定义。
操作数据库查询数据库#1. 查询M有SQL中所有的数据库SHOW DATABASES;#2. 查询当前正在使用的数据库SELECGT DATABASE();
创建数据库#1. 无需判断的创建(如果出现同名的数据库,则会报错)CREATE DATABASE EXAMPLE;#2. 判断并创建(如果不存在,则创建;反之,不创建)CREATE DAT ...
BUAA-SUMMER-PYTHON 第四次课下作业
前言成绩出来了,大力推荐这个暑期课程,可以是全英,也可以是一般专业,最重要是给分很好!
该网页含有课上和课下题目,没有题解。如要看题解(笨笨我写的,不是很好),可以移步https://github.com/Afeii1/BUAA_Summer_Python
第一题【Problem Description】
Sort the grades for a class of students.
Input the names and grades of the students (maximum of 50 students in a class) into the console, and then output the names and grades of the students in descending order of their grades. If two students have the same grade, they are to be sorted according to the order of input.
【Input Format】
Input the ...
BUAA-SUMMER-PYTHON 第三次课下作业
前言该网页含有课上和课下题目,没有题解。如要看题解(笨笨我写的,不是很好),可以移步https://github.com/Afeii1/BUAA_Summer_Python
第一题【Problem Description】Write a program that can input a three-digit positive integer and output the corresponding number in reverse order. If the input number is not a three-digit positive integer, output -1.
【Input Format】Input a three-digit positive integer.
【Output Format】Output the value of the number after reversing the digits.
【Sample Input】
356
【Sample Output】
653
【Explanation】
The positive integer val ...
BUAA-SUMMER-PYTHON 第三次课上作业
前言该网页含有课上和课下题目,没有题解。如要看题解(笨笨我写的,不是很好),可以移步https://github.com/Afeii1/BUAA_Summer_Python
选择题
Which of the following options is not a reserved word in the Python programming language?A. passB. whileC. doD. except
Which of the following options does not comply with the variable naming rules in the Python programming language?A. 33keywordB. keyword_33C. 33_keywordD. keyword33
Regarding the eval function, which of the following options describes incorrectly:A. The execution of eval(“Hello”) and eval ...
BUAA-SUMMER-PYTHON 第二次课下作业
前言该网页含有课上和课下题目,没有题解。如要看题解(笨笨我写的,不是很好),可以移步https://github.com/Afeii1/BUAA_Summer_Python
title: BUAA-SUMMER-PYTHON 第二次课下作业categories:
- BUAA-SUMMER-PYTHON
- 课下
第一题【Problem Description】 A sequence of integers, where the first element is m and the second element is n, and each subsequent element after is the sum of the previous two elements. (-100≤n≤100, -100≤m≤100) For example, the sequence: 1, 1, 2, 3, 5, 8, 13, 21… Write a program that can take integer values m and n as input, solve th ...
BUAA-SUMMER-PYTHON 第二次课上作业
前言该网页含有课上和课下题目,没有题解。如要看题解(笨笨我写的,不是很好),可以移步https://github.com/Afeii1/BUAA_Summer_Python
选择题
Which of the below Python data type is mutable? _ A. Tuple B. String C. List D. Dictionary
Which Python built-in function is used to remove and return an element from a list? _ A. append() B. remove() C. pop() D. sort()
The following is a piece of code that sums up all the values in a dictionary and prints the result:
d = {"a": 1, "b": 2, "c": 3}total = _ ...
BUAA-SUMMER-PYTHON 第一次课下作业
前言该网页含有课上和课下题目,没有题解。如要看题解(笨笨我写的,不是很好),可以移步https://github.com/Afeii1/BUAA_Summer_Python
2025年第一次课下作业1【Description】
Gives two integers a and b as input, returns the value of a+b+a*b.
【Input】
A line contains two integers, separated by space, representing a and b.
【Output】
An integer, the value of a+b+a*b.
【Examples Input】
1 1
【Examples output】
3
【Example description】
1+1+1*1=3
【Notes】
For 100% of test cases, a,b in [1, 10000].
2【Description】
Given two strings s and t, returns the number of t ...
BUAA-SUMMER-PYTHON 第一次课上作业
前言这是2024-BUAA-Python 课程的一些经验分享。该网页含有课上和课下题目,没有题解。如要看题解(笨笨我写的,不是很好),可以移步https://github.com/Afeii1/BUAA_Summer_Python
选择题
Which option is the result of 100//3?A. 33B. 34C. 33.333333333333333D. 0.333333333333333
x is a two-digit integer variable. Which statement swaps its tens and units digits?A (x%10)10+x%10B (x%10)10+x//10C (x/10)%10+x%10D (x/10)%10+x//10
The output of the following code is ();
a,b,c,d,e,f = 'Python'b =
A.1 B.0 C.Error D.’y’
Which of the following statements ...



