2-5:名言

题目描述:

找出一个你钦佩的名人说的名言,将这个名人的姓名和他的名言打印出来。输出应类似下面这样(包括括号):

Albert Einstein once said, "A person who never made a mistake never tried anything new."

代码如下:

person_and_saying = 'Albert Enstein once said, "A person who never made a mistake never tried anythin new."'
print(person_and_saying)

运行结果:


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <title>My Interactive Web Page</title> <style> body { background-color: #f2f2f2; font-family: Arial, sans-serif; } h1 { text-align: center; color: #333; } p { font-size: 18px; line-height: 1.5; margin-bottom: 20px; } .container { max-width: 800px; margin: 0 auto; padding: 20px; } .button { display: inline-block; padding: 10px 20px; background-color: #333; color: #fff; text-align: center; text-decoration: none; font-size: 16px; border-radius: 5px; transition: background-color 0.3s ease; cursor: pointer; } .button:hover { background-color: #666; } </style> </head> <body> <div class="container"> <h1>欢迎来到我的网站</h1> <p>这是一个简单的网页,演示了使用HTML、CSS和JavaScript来创建的体验。.</p> <p>单击下面的按钮更改页面的背景色:</p> <button class="button" onclick="changeBackgroundColor()">改变颜色</button> <p>这里是跟多的内容:</p> <ul> <li><a href="http://www.baidu.com" >百度一下,你就知道</a></li> <li><a href="https://www.taobao.com" >淘宝网</a></li> <li><a href="https://weibo.com" >微博</a></li> </ul> </div> <script> function changeBackgroundColor() { var body = document.querySelector('body'); body.style.backgroundColor = getRandomColor(); } function getRandomColor() { var letters = '0123456789ABCDEF'; var color = '#'; for (var i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() * 16)]; } return color; } </script> </body> </html>,请在此代码中加入更多内容,使网页显示跟丰富
最新发布
06-13

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值