Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
14 views

Python Coding Chart

This document provides a basic Python coding chart that outlines key concepts and their syntax for beginners. It includes examples and explanations for print statements, variables, data types, operators, conditional statements, loops, functions, lists, tuples, dictionaries, comments, importing modules, range function, and string formatting. The chart serves as a quick reference to help newcomers start coding in Python.

Uploaded by

harshmaurya1906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Python Coding Chart

This document provides a basic Python coding chart that outlines key concepts and their syntax for beginners. It includes examples and explanations for print statements, variables, data types, operators, conditional statements, loops, functions, lists, tuples, dictionaries, comments, importing modules, range function, and string formatting. The chart serves as a quick reference to help newcomers start coding in Python.

Uploaded by

harshmaurya1906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Haan, Lucknow mein aapke liye ek basic Python coding chart yahan diya gaya hai.

Yeh chart
kuch mukhya Python concepts aur unke basic syntax ko darshata hai. Yeh shuruaat karne
walon ke liye ek quick reference ki tarah kaam aa sakta hai.
Basic Python Coding Chart
Concept Syntax Udaharan Vyakhya
Print Statement print(object) print("Namaste, Screen par output
Duniya!") display karne ke liye.
Variables variable_name = value age = 30 Data ko store karne ke
liye naam diye gaye
containers.
Data Types int, float, str, bool, list, number = 10, pi = 3.14, Alag-alag prakaar ka
tuple, dict name = "Ali", is_valid = data represent karte
True, colors = ["red", hain.
"green"], point = (2, 3),
info = {"city":
"Lucknow"}
Operators +, -, *, /, //, %, **, ==, !=, result = 5 + 3, Calculations karne,
>, <, >=, <=, and, or, is_greater = age > 25, tulna karne, aur logical
not both_true = True and operations perform
True karne ke liye istemaal
hote hain.
Conditional if condition:, elif python if age >= 18: Kuch sharton ke
Statements condition:, else: print("Adult") elif age < aadhar par code ke
13: print("Child") else: alag-alag blocks ko
print("Teenager") execute karne ke liye.
Loops - for for item in sequence: python for color in Kisi sequence (jaise
colors: print(color) list, string, range) ke
har item par iterate
karne ke liye.
Loops - while while condition: python count = 0 while Jab tak condition true
count < 5: print(count) hai, code ke ek block
count += 1 ko bar bar execute
karne ke liye.
Functions def python def Code ke reusable
function_name(paramet greet(name): return blocks banane ke liye.
ers):, return value f"Hello, {name}!" Parameters function ko
message = input dete hain, aur
greet("Aisha") return se function
print(message) output deta hai.
Lists [item1, item2, ...] my_list = [1, "apple", Ordered collection of
True] items jo badle ja sakte
hain (mutable).
Tuples (item1, item2, ...) my_tuple = (1, "apple", Ordered collection of
True) items jo badle nahi ja
sakte hain (immutable).
Dictionaries {key1: value1, key2: my_dict = {"name": Key-value pairs ka
value2, ...} "Zoya", "age": 28} collection, jahan har
Concept Syntax Udaharan Vyakhya
value ek unique key se
associated hota hai.
Comments # This is a comment # Yeh ek tippani hai Code ko samajhne
mein madad karne ke
liye likhe gaye notes,
jinhe Python interpreter
ignore karta hai.
Importing Modules import module_name, import math, from External libraries aur
from module_name random import randint modules se code ko
import item_name apne program mein
shaamil karne ke liye.
Range Function range(start, stop, step) for i in range(0, 10, 2): Numbers ki ek
print(i) sequence generate
karne ke liye, jo loops
mein aksar istemaal
hota hai.
String Formatting f"Hello, name = "Vikram" Strings ke andar
(f-strings) {variable_name}!" print(f"My name is variables ko embed
{name}") karne ka ek concise
tarika.
Yeh sirf ek basic chart hai, aur Python ek bahut badi aur shaktishali bhasha hai jismein aur bhi
bahut saare concepts hain. Lekin yeh chart aapko shuruwat karne aur kuch buniyadi coding
tasks karne mein zaroor madad karega.
Agar aap kisi specific concept ke baare mein aur jaanna chahte hain toh pooch sakte hain!

You might also like