I just created a web page countdown timer using OpenAI's ChatGPT in a about 3 minutes. All I had to do was login to the interface and using the playground typed this at the top of the page and clicked submit.:
Code: Select all
<!-- Create web page count down timer -->
<!DOCTYPE html>
Which resulted in the Artificial Intelligence ChatGPT writing the complete code in about 3 minutes. This is the code it made:
Code: Select all
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Countdown Timer</title>
<style>
#countdown {
font-size: 60px;
font-weight: bold;
color: #f00;
}
</style>
<script>
// Set the date we're counting down to
var countDownDate = new Date("Feb 27, 2023 22:37:25").getTime();
// Update the count down every 1 second
var x = setInterval(function() {
// Get today's date and time
var now = new Date().getTime();
// Find the distance between now and the count down date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes and seconds
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Display the result in the element with id="demo"
document.getElementById("countdown").innerHTML = days + "d " + hours + "h "
+ minutes + "m " + seconds + "s ";
// If the count down is finished, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById("countdown").innerHTML = "EXPIRED";
}
}, 1000);
</script>
</head>
<body>
<p>Countdown timer until Feb 27, 2023 22:37:25</p>
<div id="countdown"></div>
</body>
</html>
Test it in a browser........mind blowing......
I translated a driver for an X10 transceiver written for Python 2.7 into Python 3.7 using the commented text:
Code: Select all
##### Translate this function from Python2.7 into Python3.7
### Python2.7
code goes here
###Python3.7
Wow is all I can say. What if I ask it to design a Puppy Linux Distro?