-
实验三
实验任务一 源代码 #include <stdio.h> char score_to_grade(int score); int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = score_to_ -
实验二
实验二:类和对象 Task1:类 T 的构造和析构 // task1.cpp #include <iostream> #include <utility> #include "t.h" void test() { using std::cout; using std::endl; cout << " -
实验二
实验任务1 task1 源代码 t.h 点击查看代码 #pragma once #include <string> class T { public: T(int x = 0, int y = 0); // 普通构造函数 T(const T &t); // 复制构造函数 T(T &&t); // 移 -
实验2
1. 实验任务1 分别给出t.h, t.cpp, task1.cpp源码 t.h: #pragma once #include <string> class T { public: T(int x = 0, int y = 0); // 普通构造函数 T(const T &t); // 复制构造函数 -
删数问题作业
删数问题作业 删数问题 贪心策略 给一个 n 位正整数(用字符串存),删 k 位、剩下数字保持原相对次序,使结果最小。所有结果都是 n-k 位,位数相同,所以从高位起逐位比大小即可。 我的策略:每轮删掉从左到右第一个比后一位大的数字(第一个下降点的左端);如果整串不下降,就删最后一位;重复 k 次。 -
实验3
实验1 问题1:功能:接收一个整数类型的考试分数,将其转换成对应的等级字符(A、B、C、D、E) 形参类型:int(整型),参数名为 score 返回值类型:char(字符型),返回变量 ans 问题2:缺少 break 语句导致“穿透” 数据类型错误(双引号表示字符串) 实验2 问题1:功能: 计 -
实验二
实验任务1 源代码 t.h 点击查看代码 #pragma once #include <string> class T { public: T(int x = 0, int y = 0); // 普通构造函数 T(const T &t); // 复制构造函数 T(T &&t); // 移动构造函数 -
实验2
任务1 源代码: 点击查看代码 //t.h #pragma once #include <string> class T { public: T(int x = 0, int y = 0); // 普通构造函数 T(const T &t); // 复制构造函数 T(T &&t); // 移动构造函数 -
数据采集第三次作业
第三次作业博客(多线程图片爬虫 + Scrapy 框架爬虫) 运行环境:Windows 11、Python 3.13、Scrapy 2.20 主要依赖:requests、beautifulsoup4、scrapy、pymysql 作业内容:① 单/多线程图片爬取;② Scrapy + Xpath + -
高级语言程序设计课程第六次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16752 学号:0102600218 姓名:曾 -
数据采集二
一.天气数据 如图所示,用开发者模式,提取出日期为h1,天气描述为p.wea,span为最高温,i为最低温。 import requests # 用于发送 HTTP 请求 from bs4 import BeautifulSoup # 用于解析 HTML 网页 import sqlite3 # 用于 -
实验二
实验任务一 源码 t.cpp #include "t.h" #include <iostream> #include <stdexcept> #include <string> // static成员数据: 类内声明、类外初始化 const std::string T::doc{"a simple -
数据采集第二次作业
数据采集第二次作业 运行环境:Windows 11、Python 3.13 主要依赖:requests、beautifulsoup4、json(标准库)、sqlite3(标准库) 作业内容:分别完成天气预报、股票行情、大学排名三个定向爬虫,抓取数据并写入 SQLite 数据库。 一、作业实现(代码与 -
实验二
task1 源代码 t.h #pragma once #include <string> class T { public: T(int x = 0, int y = 0); T(const T &t); T(T &&t); ~T(); void adjust(int ratio); static -
实验2
任务1 源代码 t.h 点击查看代码 #pragma once #include <string> class T { public: T(int x = 0, int y = 0); // 普通构造函数 T(const T &t); // 复制构造函数 T(T &&t); // 移动构造函数 ~T -
20242418 2026-2027-1《网络与系统攻防技术》实验五实验报告
20242418 2026—2027—1《网络与系统攻防技术》实验五实验报告1. 基础知识1.1 域名与IP信息搜集基础知识点基本原理或用途本次实验中的作用DNS与域名解析DNS负责把域名与资源记录关联,查询结果受缓存、TTL和递归解析器影响。用qq.com查询A、AAAA、NS、MX,并比较不同工 -
实验2
任务一 源代码 t.cpp 点击查看代码 #include "t.h" #include <iostream> #include <stdexcept> #include <string> // static³ÉÔ±Êý¾Ý: ÀàÄÚÉùÃ÷¡¢ÀàÍâ³õʼ» -
数据采集作业三
作业①: 1)中国气象网图片爬取实验 1)页面分析 中国气象网的页面结构比较适合用 BeautifulSoup 解析。图片主要写在 img 标签的 src 属性中,部分页面还可能使用 data-src、data-original 等懒加载属性。为了提高通用性,程序除了解析 src,还解析了 srcs -
实验2
实验2 类和对象_基础编程 实验报告 一、实验目的 掌握C++中类的定义、对象的创建与使用方法,理解封装的基本特性。 理解普通构造函数、拷贝构造函数、移动构造函数、析构函数的功能与调用时机。 掌握静态成员变量与静态成员函数的使用,理解其属于类而非对象的本质特性。 掌握友元函数、const成员函数的使 -
实验2
任务一 源代码 t.cpp #include "t.h" #include <iostream> #include <stdexcept> #include <string> // static成员数据: 类内声明、类外初始化 const std::string T::doc{"a simple c