Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 07ad523

Browse files
file structure
1 parent 079cbcc commit 07ad523

File tree

19 files changed

+163
-0
lines changed

19 files changed

+163
-0
lines changed

‎Week 1/Day 1/assignment.md‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Python for Beginners — Day 1 Assignment
2+
3+
**Prepared by:** [Shubham](https://github.com/Shubham-S151)
4+
🎥 *From the [Bit and Pi](https://www.youtube.com/@BitandPi) YouTube Channel*
5+
6+
---
7+
8+
## Topics Covered Today
9+
10+
- Introduction to Python
11+
- Defining Variables
12+
- Rules for Naming Variables
13+
- Python Data Types
14+
- String
15+
- Numeric (int, float, complex)
16+
- Boolean and None
17+
- Collection (list)
18+
19+
---
20+
21+
## Assignment
22+
23+
### 🔹 Section A: Theory-Based Questions (Answer in comments)
24+
25+
1. What is Python, and why is it considered a beginner-friendly language?
26+
2. What does "Python is dynamically typed" mean? Explain with an example.
27+
3. List **three rules** to follow when naming a variable in Python.
28+
4. What is the difference between the variables `Age` and `age` in Python?
29+
5. Define the following data types with one real-life example each:
30+
- `str`
31+
- `int`
32+
- `bool`
33+
- `None`
34+
35+
---
36+
37+
### 🔹 Section B: Predict the Output
38+
39+
> ✨ First, **predict** the output. Then run the code to **verify** and **explain** any differences.
40+
41+
1.
42+
```python
43+
x = 5
44+
x = "Python"
45+
print(x)
46+
```
47+
2.
48+
```python
49+
name = "Alice"
50+
print(f"Hello, {name}")
51+
```
52+
53+
### To Acess the solution visit : [Click_here]()
File renamed without changes.

‎Week 1/Day 1/solutions.md‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Solutions — Day 1 Assignment: Python for Beginners
2+
3+
---
4+
5+
## 🔹 Section A: Theory-Based Questions
6+
7+
1. **What is Python, and why is it considered a beginner-friendly language?**
8+
Python is a high-level, interpreted programming language with a syntax that closely resembles English, making it easy to read and write. Its simplicity, dynamic typing, and massive standard libraries make it beginner-friendly.
9+
10+
2. **What does "Python is dynamically typed" mean?**
11+
It means you don’t need to declare the data type of a variable when assigning it a value. The type is determined automatically at runtime.
12+
**Example:**
13+
```python
14+
x = 10 # x is an integer
15+
x = "hello" # Now x is a string
16+
```
17+
3. **Three rules to follow when naming a variable in Python:**
18+
- Variable names must start with a letter (a–z, A–Z) or an underscore (_).
19+
- Variable names can contain letters, digits (0–9), and underscores.
20+
- Python keywords (e.g., `if`, `class`, `for`) cannot be used as variable names.
21+
22+
4. **Difference between `Age` and `age` in Python:**
23+
Python is case-sensitive.
24+
So `Age` and `age` are treated as **two distinct variables**.
25+
Example:
26+
```python
27+
Age = 25
28+
age = 30
29+
print(Age) # Output: 25
30+
print(age) # Output: 30
31+
```
32+
5. **Define the following data types with real-life examples:**
33+
34+
- `str` (String): Used to represent text data.
35+
- Example: `"Hello, world!"` could be a greeting message on a website.
36+
37+
- `int` (Integer): Used to represent whole numbers.
38+
- Example: `28` could be someone's age.
39+
40+
- `bool` (Boolean): Represents either `True` or `False`.
41+
- Example: `is_logged_in = True` means a user is currently logged in.
42+
43+
- `None` (NoneType): Used to signify the absence of a value.
44+
- Example: `score = None` when a quiz hasn’t been submitted yet, so no score is available.
45+
46+
## 🔹 Section B: Predict the Output — Solutions
47+
48+
### 1.
49+
```python
50+
x = 5
51+
x = "Python"
52+
print(x)
53+
```
54+
**Output :**
55+
```
56+
Python
57+
```
58+
**Explanation:**
59+
The variable `x` is first assigned an integer 5, then reassigned the string `"Python"`.
60+
Since Python is dynamically typed, the type can change. `print(x)` displays the latest value.
61+
62+
### 2.
63+
```python
64+
name = "Alice"
65+
print(f"Hello, {name}")
66+
```
67+
**Output :**
68+
```
69+
Hello, Alice
70+
```
71+
**Explanation:**
72+
This is an example of an **f-string**, which allows embedding expressions inside strings using {}.

‎Week 1/Day 2/assignment.md‎

Whitespace-only changes.
File renamed without changes.

‎Week 1/Day 3/assignment.md‎

Whitespace-only changes.

‎Week 1/Day 4/assignment.md‎

Whitespace-only changes.

‎Week 1/Day 5/assignment.md‎

Whitespace-only changes.

‎Week 1/Day 6/assignment.md‎

Whitespace-only changes.

‎Week 1/Day 7/assignment.md‎

Whitespace-only changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /