impress/test/index.html

91 lines
4.4 KiB
HTML

<html lang="en">
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="upgrade-insecure-requests" http-equiv="Content-Security-Policy">
<title>Python 3 vs Python 2 Presentation</title>
<style>
body {background-color: #fff; font-family: Arial, sans-serif; color: #000; margin: 0; padding: 0;}
.step {width: 600px; border-radius: 10px; padding: 40px; color: #333; text-align: center; opacity: 0; transition: opacity 1s;}
.step img {opacity: 0; transition: opacity 1s;}
.active {opacity: 1; transition: opacity 1s;}
.active img {opacity: 1; transition: opacity 1s;}
h1 {font-size: 2.5em; text-shadow: 2px 2px 4px rgba(0,0,0,.3);}
p {font-size: 1.2em; line-height: 1.4; margin: 20px 0;}
img {width: 80%; height: auto; margin-top: 20px;}
</style>
<div id="impress">
<div id="slide1" class="step" data-x="0" data-y="-1500" data-scale="4">
<h1>Introduction to Python 3 vs Python 2 🐍🆚</h1>
<p><strong>Overview</strong><br>
Python 2 was released in 2000, Python 3 in 2008.<br>
Python 3 is not backward compatible with Python 2.<br>
As of January 1, 2020, Python 2 has been officially retired.</p>
</div>
<div id="slide2" class="step" data-x="1000" data-y="-1500" data-rotate="90" data-scale="2">
<h1>Print Function 🖨️</h1>
<p><strong>Python 2</strong><br>
<code>print "Hello, world!"</code><br>
<strong>Python 3</strong><br>
<code>print("Hello, world!")</code><br>
<strong>Key Difference</strong><br>
Python 3 requires parentheses.</p>
</div>
<div id="slide3" class="step" data-x="2000" data-y="-1500" data-rotate="180" data-scale="2">
<h1>Integer Division 🧮</h1>
<p><strong>Python 2</strong><br>
<code>3 / 2</code> equals <code>1</code><br>
<strong>Python 3</strong><br>
<code>3 / 2</code> equals <code>1.5</code><br>
<strong>Key Difference</strong><br>
Python 3 performs true division by default.</p>
</div>
<div id="slide4" class="step" data-x="3000" data-y="-1500" data-rotate="270" data-scale="2">
<h1>Unicode Support 🌍</h1>
<p><strong>Python 2</strong><br>
Strings are ASCII by default.<br>
Unicode string with <code>u"Hello"</code><br>
<strong>Python 3</strong><br>
Strings are Unicode by default.<br>
<strong>Key Difference</strong><br>
Enhanced Unicode support in Python 3.</p>
</div>
<div id="slide5" class="step" data-x="4000" data-y="-1500" data-scale="2">
<h1>Input Function 📥</h1>
<p><strong>Python 2</strong><br>
<code>raw_input()</code> for user input as string.<br>
<code>input()</code> evaluates the input as Python code.<br>
<strong>Python 3</strong><br>
<code>input()</code> for user input, always returns the input as a string.<br>
<strong>Key Difference</strong><br>
<code>input()</code> in Python 3 does not evaluate the input.</p>
</div>
<div id="slide6" class="step" data-x="5000" data-y="-1500" data-rotate="90" data-scale="2">
<h1>Libraries and Packages 📚</h1>
<p><strong>Both Versions</strong><br>
Wide range of libraries and packages.<br>
<strong>Python 3</strong><br>
More libraries are now Python 3 compatible.<br>
Focus on Python 3 for future development.<br>
<strong>Key Point</strong><br>
Transition to Python 3 for better library support.</p>
</div>
<div id="slide7" class="step" data-x="6000" data-y="-1500" data-rotate="180" data-scale="2">
<h1>Conclusion 🏁</h1>
<p><strong>Transition to Python 3</strong><br>
Strongly recommended for new projects.<br>
Active development, better library compatibility.<br>
<strong>Legacy Python 2 Code</strong><br>
Consider porting to Python 3 for long-term maintenance.</p>
</div>
<div id="slide8" class="step" data-x="7000" data-y="-1500" data-rotate="270" data-scale="2">
<h1>Resources 📖</h1>
<p><strong>Official Python Documentation</strong><br>
Python 2: <a href="https://docs.python.org/2/">https://docs.python.org/2/</a><br>
Python 3: <a href="https://docs.python.org/3/">https://docs.python.org/3/</a></p>
</div>
</div>
<script src="https://impress.github.io/impress.js/js/impress.js"></script>
<script>impress().init()</script>