1.打擂台 简单的小代码,打擂台.纪念下过去,祝福下新人. public static void main(String[] args){ int[] ld = {1,4,2,10,8,9,5}; int max = ld[0]; for(int i = 1;i<ld.length;i++){ if(ld[i]>max){ max=ld[i]; } } System.out.print(max); } 2.冒泡排序 还是简单的小代码,冒泡排序.纪念下过去,祝福下新人. public stati
public class Test21 { public static void main(String[] args) { // TODO Auto-generated method stub int sum = 0; int[] array = new int[sum]; int index=0; for (int i = 1; i < 100; i++) { if (i % 3
package com.java.union4; import static org.junit.Assert.*; import org.junit.Test; public class Demo { // 5.输出从1到100之间所有不能被3整除的数;并输出这些整数的和 @Test public void test5() { int sum = 0; for (int i = 1; i <= 100; i++) { if (i % 3 != 0) { sum = sum + i; } } S
Prime Palindrome Golf Do you know how to play Prime Palindrome Golf? You are given a number and your challenge is to find the closest palindromic prime number that greater than what you were given. A palindromic number or numeral palindrome is a numb
1.迭代器 (1)可迭代对象 s1 = ' for i in s1: print(i) 可迭代对象 示例结果: D:\Python36\python.exe "E:/Python/课堂视频/day13视频与课堂笔记/day13课堂笔记/day13/02 迭代器.py" 1 2 3 True False Process finished with exit code 0 示例结果 int object is not iterable for i in 123: print(i) Int
『Python题库 - 填空题』Python笔试填空题 part 1. Python语言概述和Python开发环境配置 part 2. Python语言基本语法元素(变量,基本数据类型, 基础运算) part 3. Python中的程序控制结构 (Python if判断,for和while循环相关知识点) part 4. Python中的代码复用(Python函数相关知识点) part 5. Python面向对象编程(类,异常,库) part 6. Python文件操作 part 1
控制语句 0.前定义 语句块(有时叫做复合语句),是用花括号扩起的任意数量的简单Java语句. 块确定了局部变量的作用域.块中的程序代码,作为一个整体,是要被一起执行的. 块可以被嵌套在另一个块中,但是不能在两个嵌套的块内声明同名的变量. 语句块可以使用外部的变量,而外部不能使用语句块中定义的变量,因为语句块中定义的变量作用域只限于语句块. public class Test { public static void main(String[] args) { int n; int a; { i