Skip to content

Commit c75904a

Browse files
Merge pull request #14 from DevOps-With-Hammad/Py24_02_BIA_DataTypes_and_variables
Py24 02 bia data types and variables to main
2 parents 862e80f + 4bb3f66 commit c75904a

11 files changed

+123
-12
lines changed

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Ignore PyCharm project files
2+
.idea/
3+
4+
# Ignore Python virtual environments
5+
venv/
6+
7+
# Ignore any other specific file
8+
misc.xml
9+
Software_enginnering-Code_base.iml
10+
inspectionProfiles/

.idea/workspace.xml

+48-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Basic_Py_Syntax

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 1. [BIA] Intro to Data Types and Variables (What, Why and How of Level 2)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#2. [BIA] How to Code Data Types & Variables in Python (String+Integer Variables)
2+
name =str("Python ")
3+
#name =STR("Python")
4+
name1 = str('python 24' )
5+
#name1 = str(Python)
6+
7+
" this is code is to define name and print it "
8+
print(name, name1)
9+
"Now let's print the type of this variable "
10+
print(type(name1))
11+
# the output will be <class 'str'>
12+
13+
"Happy coding "
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 3. [BIA] Exercise 2.1 Using String and Integer Data Types
2+
# Define name as a string variable & call it Python24
3+
# print the name string Python24
4+
# Define Version Integer variable and make it version 12
5+
# Print Version
6+
lang = "Python"
7+
print(lang)
8+
Lversion = 13
9+
print(Lversion)

The Compelet Python 2024/2- [BIA] Level 2 Data Types and Variables/4. [BIA] Floating and Boolean Data Types.py

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 5. [BIA] Floating and Boolean Data Types
2+
print("Hello Python 24 ")
3+
bool_exam= true
4+
print(bool_exam)
5+
print(type(bool_exam))
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# 6. [BIA] Exercise 2.2 Using Floating and Boolean Data Types
2+
"""
3+
01 Define a boolean variable and call it "I can't do it as false"
4+
02 Print the variable .
5+
03 define a float variable and call it as the answer as 42.01
6+
print it
7+
"""
8+
I_can't_do_it = false
9+
print(I_can't_do_it)
10+
answer_as = 24.01
11+
print(answer_as)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#7. [BIA] How to Change the Content or Data Type of a Variable (Casting)
2+
brand = "Isuzu"
3+
print(brand)
4+
brand = str("Isuzu Kb ")
5+
print(brand)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# 8. [BIA] Exercise 2.3 How to Change the Content or Type of a Variable
2+
"""
3+
Isuzu is older than Ford , Isuzu 1920.00 Ford 1935
4+
Step 01 : Create a variable called Isuzus_lunch_date as string type
5+
Step 02 : Assign the lunch date to 1920.5
6+
Step 03 : Print the lunch date.
7+
Step 04 : Change the lunch date form string to float .
8+
Step 05 : Print the new Lunch date .
9+
10+
"""
11+
# Let's Code . . .
12+
# Let's Code . . .
13+
Isuzu_lunch_date = str(1920.5)
14+
print(Isuzu_lunch_date)
15+
print(type(Isuzu_lunch_date))
16+
Isuzu_lunch_date = float(Isuzu_lunch_date)
17+
print(Isuzu_lunch_date)
18+
print(type(Isuzu_lunch_date))
19+
print(Isuzu_lunch_date + 20.30 )
20+

0 commit comments

Comments
 (0)