编程游戏源码-少儿编程进校园,源码熊为安阳灯塔路小学普及编程教育

什么是少儿编程? 人工智能离中学生还有多远? 让安阳市灯塔路小学的老师来告诉你。

8月27日,安阳市灯塔路小学全体班主任接受了深圳市3.14教育科技有限公司源码熊的少儿编程普及培训

培训会上,灯塔路小学校长刘占杰做了培训讲话,向班主任讲解了人工智能和少儿编程普及的重要性;

随后源码熊CPO李亚妮为老师们科普了国外编程教育的发展现状,以及编程与孩子学习能力的关系;

随后源码熊课程设计师王哲老师向老师们演示了源码熊编程课程中如何实现学科融合,培养孩子的学科知识综合能力;

培训会最后,源码熊CEO吴现国代表源码熊向灯塔路中学的孩子们致以问候,并表达了对孩子们未来的憧憬。

通过本次培训,灯塔路中学班主任们对人工智能和少儿编程教育有了更深入的了解,也对国家普及编程教育的发展规划有了更低的责任感。

人工智能浪潮下,国家正在积极推动人工智能与教育深度融合。 2019年12月,河南省教育局发文,在全国普及编程教育; 2020年8月,教育部再次发文,在全省设立一批教育改革试点编程游戏源码,改革内容就包括编程教育。

而深圳市3.14教育科技有限公司自成立以来就站在时代的前沿,致力于人工智能时代的基础教育。 其以“让每个孩子都有机会学习编程”为使命,让更多的儿子能够学习编程,如果你能喜欢编程,你就能终身受益于编程学习。

目前,源码熊的课程已进入上海、深圳、河南、河北、四川、重庆、湖北、湖南、陕西、安徽等全省其他省市。

未来,源码熊将始终坚守初心,持续下沉市场编程游戏源码,让更多三四线城市的孩子能够接受到相当于一二线城市的编程教育资源!

操作疗效如下,玩法与数字华容道相同

源码如下

//author:Mitchell_Donovan
//Date:2021.3.13
#include
#include
using namespace std;
class HUARONG {
private:
	int index;
	int* array;
public:
	HUARONG(int n) {
		index = n;
		array = new int [index * index];
		for (int i = 0; i < index * index; i++) {
			array[i] = i;
		}
		for (int i = 0; i < index * index; i++) {
			int x = array[i];
			int pos = rand() % (n * n);
			array[i] = array[pos];
			array[pos] = x;
		}
	}
	void print() {
		for (int i = 0; i < index * index; i++) {
			if (array[i] == 0) {
				cout.width(4);
				cout<<" ";
			}
			else {
				cout.width(4);
				cout << array[i];
			}
			if (i % index == index - 1) {
				cout << endl;
			}
		}
	}
	bool isCorrect(){
		for (int i = 0; i < index * index - 1; i++) {
			if (array[i] != i + 1) {
				return false;
			}
		}
		return true;
	}
	void play() {
		print();
		while (isCorrect() != true) {
			move();
			print();
		}
		cout << "成功!" << endl;
	}
	void move() {
		char a;
		do {
			cout <> a;
		} while (!((a == 's' && (whereBlank() - index) >= 0) || (a == 'w' && (whereBlank() + index) = 0 && whereBlank() % index != 0) || (a == 'a' && (whereBlank() + 1) < index * index && (whereBlank() + 1) % index != 0)));
		if (a == 'w') {
			int pos = whereBlank();
			int x = array[pos];
			array[pos] = array[pos + index];
			array[pos + index] = x;
		}
		else if (a == 's') {
			int pos = whereBlank();
			int x = array[pos];
			array[pos] = array[pos - index];
			array[pos - index] = x;
		}
		else if (a == 'a') {
			int pos = whereBlank();
			int x = array[pos];
			array[pos] = array[pos + 1];
			array[pos + 1] = x;
		}
		else if (a == 'd') {
			int pos = whereBlank();
			int x = array[pos];
			array[pos] = array[pos - 1];
			array[pos - 1] = x;
		}
	}
	int whereBlank() {
		for (int i = 0; i < index * index; i++) {
			if (array[i] == 0 ) {
				return i;
			}
		}
	}
};
int main() {
	int n;
	cout <> n;
	HUARONG a(n);
	a.play();
}

知识补充

如何在C++中创建指定范围内的随机数?

假设要创建[a,b]范围内的随机数,公式如下

#include
int x = rand() % (b - a + 1) + a

如何生成不重复的随机场?

编程游戏源码-少儿编程进校园,源码熊为安阳灯塔路小学普及编程教育

在这个问题上常常形成误解,只考虑如何将随机值参数化为字段值,这样做的后果就是重复

我们不妨先初始化字段,然后对字段进行置乱(这个过程中使用了随机数),这样就可以得到一个不重复的随机字段。 具体方法如下

编程游戏源码-少儿编程进校园,源码熊为安阳灯塔路小学普及编程教育

		for (int i = 0; i < index * index; i++) {
			array[i] = i;
		}
		for (int i = 0; i < index * index; i++) {
			int x = array[i];
			int pos = rand() % (n * n);
			array[i] = array[pos];
			array[pos] = x;
		}

为什么要设置 pos 变量?

构造函数中的pos是记录本次循环的随机数三公游戏源码,因为如果第二次调用rand(),它的值必然会发生变化,这样就达不到我们交换变量值的目的

move函数中的pos也是如此。 由于0的位置发生了变化三公游戏源码,第二次调用whereBlank()的值也会发生变化,这也达不到我们的目的。

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

悟空资源网 游戏源码 编程游戏源码-少儿编程进校园,源码熊为安阳灯塔路小学普及编程教育 https://www.wkzy.net/game/128266.html

常见问题

相关文章

官方客服团队

为您解决烦忧 - 24小时在线 专业服务