wloe2gf 发表于 2024-8-17 10:27:42

Python和Java的程序掌控语句差别这么大?不看不晓得


    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/5bab6c4228754c169ffa74aa2a81d17a~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=7JHQUzHORm4AekbH1kE7HAUNC%2FA%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/bf2143645e81482c8b7cb275359d9de4~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=ITJPjLuqjHzJFeQLBcplkzt%2F7Xg%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">文案</span>较长,<span style="color: black;">意见</span><span style="color: black;">保藏</span>!</p>
    <h1 style="color: black; text-align: left; margin-bottom: 10px;"><strong style="color: blue;"><span style="color: black;">1、</span>Python的程序<span style="color: black;">掌控</span>语句</strong></h1>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">1、<span style="color: black;">次序</span>结构</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">次序</span>结构是程序<span style="color: black;">根据</span>线性<span style="color: black;">次序</span>依次执行的一种运行方式</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/4c6a0256fb0f4650b8b09feaf282cb4b~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=2p1sLqZYrCqe54O2E17Av%2FG2kMs%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">2、分支结构</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">① 单分支结构</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/78002484b1ba42608c633f043187aadb~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=e5NDqpXsw0owDB3O%2BT62Tsbtjr0%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">② 二分支结构: if-else语句</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/2f80cec7f7b04a3ea2a4d696115af6c4~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=4v9XesVH0cwCjGt8pgwltNkwQXo%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">③ 二分支简洁写法</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/461c60b4b2d34e3bb7f650e23c773044~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=V4lCG03%2BBObEb9jAOlnaOH8u3Eo%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">④ 多分支结构: if-elif-else语句</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/e4b5f61f746a4aaf86345b91a42c19c2~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=v5zqZh3F1EgyJNy2sLBElRlr4ls%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">3、循环结构</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">① for 循环</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">I、 遍历结构</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/0f2ba52f2a6148b386bf38049e0dc69e~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=VdRQyUj2WKGaFlpLmjuuxTrLBNI%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p26-sign.toutiaoimg.com/pgc-image/d40301fcfaf3456591c570dd3eac8b71~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=kJbN1cDGtK72jpK3DqWQGD87ltw%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/83d5010c319a47b392c07d4ac50e7811~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=%2F5QWjTf3mEAyLjKaiZcO1UGbL4o%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/528f2c7e9f944448b893639d3d35e918~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=aRXIslK9rRcscClrL1LqWuo9QLE%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">扩展模式:</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">当 for 循环正常执行之后,程序会继续执行 else 语句 中内容。else 语句<span style="color: black;">仅在</span>循环正常执行之后才执行并结束。</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">重视</span>:正常执行</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/028a00dbf38c4026a7ef20fa0cb3d506~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=ELb9E19l7oadxcd6ueBgJz73xjc%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/55585a900aac42449af8b6441646f046~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=Gg1JpnZOM87g0EtsJcRy465M1bQ%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">② while 循环</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">① while 基本用法</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/84898d916a3847df973537c012eb4218~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=TVAxpBmH%2FecNXoFFGf9E2GOd8Go%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">② 扩展 while - else</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">在这种扩展模式中,当 while 循环正常执行之后,程序会继续执行 else 语句中内容</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/10ed0754d66242a38f9db8153308d907~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=0KmSfl8ASRcvH5eeiiCIf2nEarA%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">当<span style="color: black;">咱们</span>确定循环次数,用 for 循环;当循环次数不确定是用 while。</strong></p>
    <h1 style="color: black; text-align: left; margin-bottom: 10px;"><strong style="color: blue;"><span style="color: black;">2、</span>Java的程序<span style="color: black;">掌控</span>语句</strong></h1>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">1、<span style="color: black;">次序</span>结构</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">次序</span>结构是程序中最简单最基本的流程<span style="color: black;">掌控</span>。从上往下,依次执行。</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/ea7d48e786164bb88cd40e60dde12d33~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=t3mTI95rUNj6SZ%2BpfGq8DMkBZds%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">2、分支结构</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">【1】if 分支结构</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">① <span style="color: black;">第1</span>种格式</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">I、执行流程图:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/eaf762e4992344ea879386a36ec89ee9~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=owYeqtlEQaj1VjqDDW4AN0f5T4Q%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">II、代码展示:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/59ddb731f18c446ba7f49b37bfea1f42~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=OZZgx78ngU70%2Ft1RyXxO5pxSnPI%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">III、输出结果:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/6327213d5a0947cabe66d78526933a51~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=b1zVNoJf7Dm%2F43a9n0MP%2B%2BjJypw%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">② 第二种格式</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">I、执行流程图:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/151e29a993e244479be50ec227d6f041~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=llieZCHd0YmCqBdiCQqzHTX4ok0%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">II、代码展示:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/d89d16d78e6240679a80c83839da37f6~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=q%2Bco%2FhQO7Kl0XSnp1qYedhdnRcw%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">III、输出结果:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/f578c3e8716a4952b75a8b0ba0d70c19~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=93W0VSmO5O9jKuT62t3Pw7OMKQw%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">③ 第三种格式</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">I、执行流程图:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/1fa1b48da15c4ab8a6be6df71ef4e2a7~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=awuF1vf2pLKaIxYO6eZX8G%2BiXVA%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">II、代码展示:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/ecf5da9681cc4f9eb8a86c08c555cca2~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=2NpZeiX%2BUWrRHZobUMhWKt7YZOc%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">III、输出结果:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/23be927d4b4c4bc2b652523651727003~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=PM3Mcxa1C9VgOTcXTq3Gww9KzOY%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">思考题:</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">当键盘输入10,输出结果是多少?<span style="color: black;">倘若</span>你还模棱两可,请回头再看执行流程图。</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/a0389205eb5a41699d0e62ccbdb8bbdf~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=JRqp1aLqNbfTFT9RYtu8MNDSDiM%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">【2】switch分支结构</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">I、执行流程图:</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">首要</span>计算出表达式的值</strong></p><strong style="color: blue;">
      <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">其次,和case依次比较,一旦有对应的值,就会执行相应的语句,在执行的过程中,遇到break就会结束。</p>最后,<span style="color: black;">倘若</span>所有的case都和表达式的值不匹配,就会执行default语句体部分,<span style="color: black;">而后</span>程序结束掉。
    </strong>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/65ef92b45ab048afbdc8ded9f6b816d5~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=XY4FlBlKNQd1%2BRPfVP2gXjVzlvs%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">II、代码展示:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/7e1fb53b5bcb4290b05cc972a8452265~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=vKBX463D4DrvVs60aLn%2B0vru7AQ%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">III、输出结果:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/6f4ff6cbc0c3446886ab69cc79b4d9d9~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=3t%2Fji0aMvgkcEW2xIifq%2BHLZLLQ%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">重视</span>事项:</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">① swich(表达式)中表达式的返回值<span style="color: black;">必要</span>是以下几种类型之一:</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">byte,short,char,int,枚举(jdk1.5),String(jdk1.7)</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">② case子句中的值<span style="color: black;">必要</span>是常量,且所有case子句中的值应是<span style="color: black;">区别</span>的;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">③ default子句是可任选的,当<span style="color: black;">无</span>匹配的case时,执行default;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">④ break语句用来在执行完一个case分支后使程序跳出swich语句块;<span style="color: black;">倘若</span><span style="color: black;">无</span>break程序会<span style="color: black;">次序</span>执行到swich结尾;</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">3、循环结构</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">① for 循环</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">I、执行流程图</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/d562f966420049659eb30f621379d010~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=7eISeIbfNcaGgNR72O%2FNZiv%2By6E%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">II、代码展示</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/480b3b3103f04479a0d06b2566519f92~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=nFZ%2FO%2FoECzWgVEb6E8KbFYxmigo%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">② foreach 循环语句</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/1928f98f1a584155bcc5e65855a522af~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=3mQ1GUrl6QL591ZlNd0tAIi%2BHTo%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">③ java8 的新特性 forEach 的<span style="color: black;">运用</span>:循环 list 和 map</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/c773eb61bf92415c953ed3444f7aa7b0~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=CrxDA9Terf%2Bx4wqzLYxH%2B7FMAK0%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">面试:<span style="color: black;">为何</span> java8 新特性要<span style="color: black;">增多</span> foreach<span style="color: black;">办法</span>,有什么<span style="color: black;">优良</span>? </strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">④ while 循环</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/5e34efd31dc04b50a4d85da1f86e938b~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=GjoTgu7tEZwnxZ4%2BAT1QpxZknC4%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">⑤ do…while循环语句</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/b5666be57cd04a2cb3c6dbe37f3de7a9~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=17IUNdphgdYXLhZfxHl0Ra5D3l4%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">代码展示:</strong></p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/eb428b57b9a54fd088e5eb6cc463a0e9~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1723889852&amp;x-signature=PHF6xBPuGaIhN5%2FRrSutKQSJHoU%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">1.do...while循环<span style="color: black;">最少</span>执行一次循环体.</strong></p><strong style="color: blue;">2.而for,while循环<span style="color: black;">必要</span>先判断<span style="color: black;">要求</span><span style="color: black;">是不是</span>成立,<span style="color: black;">而后</span>决定<span style="color: black;">是不是</span>执行循环体语句.
    </strong>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">从上面的介绍,<span style="color: black;">咱们</span><span style="color: black;">能够</span>看出 Java 语法比 Python 的语法要<span style="color: black;">繁杂</span>些,Python 语法相对简单,理念还是<span style="color: black;">同样</span>的。</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">&gt;&gt;&gt;<a style="color: black;">Python 和 Java <span style="color: black;">基本</span>对比 04——变量(下)</a></strong></p>




张露zhang 发表于 2024-8-29 00:16:56

你的话语如春风拂面,温暖了我的心房,真的很感谢。

情迷布拉格 发表于 2024-8-29 01:13:16

楼主的文章非常有意义,提升了我的知识水平。

qzmjef 发表于 2024-9-30 10:36:34

“NB”(牛×的缩写,表示叹为观止)‌

nykek5i 发表于 2024-10-2 12:20:05

我完全赞同你的观点,思考很有深度。

b1gc8v 发表于 2024-10-16 23:54:26

软文发布平台 http://www.fok120.com/
页: [1]
查看完整版本: Python和Java的程序掌控语句差别这么大?不看不晓得