Skip to content

Commit 3adddf0

Browse files
Initial commit
0 parents  commit 3adddf0

File tree

8 files changed

+89
-0
lines changed

8 files changed

+89
-0
lines changed

.idea/.gitignore

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

.idea/PythonMasteryHub_2024.iml

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

.idea/inspectionProfiles/profiles_settings.xml

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

.idea/misc.xml

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

.idea/modules.xml

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

PythonProgramizRevision_Jan2024/__init__.py

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
"""
2+
Author - Chittaranjan Swain
3+
This file concept all the basic concepts required to start with Python.
4+
"""
5+
6+
a = 5; #Numeric, no need to declare int a = 5, Python interpretor automatically detects the type.
7+
name = "PythonPractice"
8+
b = None # None is a special literal
9+
10+
# Taking input
11+
name = input("Tell me you name: ")
12+
age = int(input("Tell me you age: "))
13+
print(name, type(name), age, type(age))
14+
print(name, " is ", age, " years old!")
15+
16+
# Conversion between data types - We canvert between different datatypes using type conversion function like int(), float(), str() etc.
17+
print(float(5))
18+
print(int(4.5))
19+
print(float('5.6'))
20+
print(str(25))
21+
#print(int('1p')) #error
22+
23+
print(set([1,2,2,3])) #{1,2,3}
24+
print(tuple([1,2,2,3])) #(1,2,2,3)
25+
print(list('hello')) #['h', 'e', 'l', 'l', 'o']
26+
print(dict([[1,22],[2,32]])) #{1: 22, 2: 32}
27+
print(tuple({5,6,6,7})) #(5, 6, 7)
28+
29+
#imports
30+
import math
31+
print(math.pi) #3.141592653589793
32+
import sys
33+
print(sys.path[0]) #C:\Users\chitt\PycharmProjects\Python-Playground-For-QA\PyProgramizzRevisionDec2023
34+
35+
#Python Namespace
36+
a = 2
37+
print(id(a)) #1876981580048
38+
print(id(2)) #1876981580048
39+
a = a+1
40+
print(id(a)) #1831273038128
41+
b = 2
42+
print(id(b)) #1876981580048

main.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This is a sample Python script.
2+
3+
# Press Shift+F10 to execute it or replace it with your code.
4+
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
5+
6+
7+
def print_hi(name):
8+
# Use a breakpoint in the code line below to debug your script.
9+
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
10+
11+
12+
# Press the green button in the gutter to run the script.
13+
if __name__ == '__main__':
14+
print_hi('PyCharm')
15+
16+
# See PyCharm help at https://www.jetbrains.com/help/pycharm/

0 commit comments

Comments
 (0)