-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathweek2.html
More file actions
140 lines (127 loc) · 6.06 KB
/
week2.html
File metadata and controls
140 lines (127 loc) · 6.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Week 2: Python Basics: Variables, Data Types, and Operations</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<style>
.key-concept {
background-color: #f8f9fa;
border-left: 4px solid #007bff;
padding: 15px;
margin: 15px 0;
}
.exercise {
background-color: #e9ecef;
padding: 15px;
margin: 10px 0;
border-radius: 5px;
}
.resource-link {
background-color: #fff;
padding: 10px;
margin: 5px 0;
border: 1px solid #dee2e6;
border-radius: 5px;
}
.research-tip {
background-color: #d1ecf1;
border: 1px solid #bee5eb;
padding: 10px;
margin: 10px 0;
border-radius: 5px;
font-size: 0.9em;
}
.chatgpt-tip {
background-color: #d1ecf1;
border: 1px solid #bee5eb;
padding: 15px;
margin: 15px 0;
border-radius: 5px;
}
</style>
</head>
<body>
<nav>
<ul class="nav-links" style="display: flex; gap: 20px; list-style-type: none; padding: 0; font-weight: bold; font-size: 1.2em; justify-content: center;">
<li><a href="index.html" style="text-decoration: none; color: #007bff;">Home</a></li>
<li><a href="about.html" style="text-decoration: none; color: #007bff;">About</a></li>
<li><a href="contact.html" style="text-decoration: none; color: #007bff;">Contact</a></li>
</ul>
</nav>
<div class="container">
<div class="key-concept">
<h2>Week 2: Python Basics: Variables, Data Types, and Operations</h2>
<p class="lead">Learn the fundamental building blocks of Python programming with a focus on financial calculations.</p>
</div>
<h3>Learning Objectives:</h3>
<ul>
<li>✓ Understand variables and data types in Python</li>
<li>✓ Perform basic operations with variables</li>
<li>✓ Learn how to take input and produce output in Python programs</li>
</ul>
<div class="resource-link">
<h4>1. Variables in Python</h4>
<p>What are variables? How to declare and assign values to variables in Python.</p>
<a href="https://www.w3schools.com/python/python_variables.asp" target="_blank">Read more about Variables in Python</a>
<div class="research-tip">
<p>📚 <strong>Can't access the link?</strong> Use <a href="https://www.perplexity.ai/" target="_blank">Perplexity.ai</a> and search for "Python variables basics tutorial"</p>
</div>
</div>
<div class="resource-link">
<h4>2. Data Types in Python</h4>
<p>Understanding different data types in Python: integers, floats, strings, booleans.</p>
<a href="https://www.w3schools.com/python/python_datatypes.asp" target="_blank">Read more about Data Types in Python</a>
</div>
<div class="resource-link">
<h4>3. Basic Operations</h4>
<p>Performing arithmetic and logical operations with variables in Python.</p>
<a href="https://www.w3schools.com/python/python_operators.asp" target="_blank">Read more about Basic Operations in Python</a>
</div>
<div class="resource-link">
<h4>4. Input and Output in Python</h4>
<p>How to take input from the user and display output in Python programs.</p>
<a href="https://www.w3schools.com/python/python_user_input.asp" target="_blank">Read more about Input and Output in Python</a>
</div>
<h3>Exercises:</h3>
<div class="exercise">
<ol>
<li>Create variables of different data types (int, float, string) to store financial data:
<ul>
<li>Stock price (float)</li>
<li>Number of shares (int)</li>
<li>Company ticker symbol (string)</li>
</ul>
</li>
<li>Write a program that calculates the total value of a stock position (price × number of shares)</li>
<li>Create a simple interest calculator that takes principal, rate, and time as inputs</li>
<li>Write a program that converts currency (e.g., USD to EUR) using a fixed exchange rate</li>
<li>Create a program that calculates the future value of an investment after n years</li>
<li>Write a program that calculates monthly loan payments given principal, interest rate, and years</li>
</ol>
</div>
<div class="chatgpt-tip">
<h4>💡 ChatGPT Learning Tips</h4>
<p>Use these prompts to enhance your learning:</p>
<ol>
<li>"Explain Python data types using financial examples (stock prices, share counts, company names)"</li>
<li>"Show me how to write a simple interest calculator in Python and explain each variable type"</li>
<li>"What are the common mistakes when working with floating-point numbers in financial calculations?"</li>
<li>"How do I format currency output in Python to show exactly 2 decimal places?"</li>
</ol>
</div>
</div>
<div style="text-align: center; margin-top: 20px;">
<a href="week1.html">← Previous Week</a>
|
<a href="week3.html">Next Week →</a>
</div>
<div class="back-to-home">
<a href="index.html">← Back to Home</a>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</body>
</html>