Python Codes Basic to Advance
2.66K subscribers
82 photos
5 videos
8 files
100 links
Python Codes Basic to Advance

All Codes
@C_Codes_pro
@CPP_Codes_pro
@Java_Codes_Pro
@nodejs_codes_pro

Discussion
@bca_mca_btech
Download Telegram
Now Starting regular Codes Of Python/Django

You Want To practice these Codes in Regular basis

Don't worry if You are beginner or Advance Coders.
For Questions @BCA_Group_Pro
👍9
#1 This is Your first Python Code

print("Hello")
👍121
#2 Creating variables

var = 5 # Here_var_is_variable
# It_has_stored_value_5

print (var) # Showing_var_value
👍16👏3
#3 Creating variables & Adding

var1 = 5 # Variable 1
var2 = 7 # Variable 2

print (var1, '+', var2, '=', var1 + var2)
# Showing Add Result
Output 👆 of {This Program}
👏6👍4
#5 Arrays[Basically List] in Python

arr = [2, 3, 5] # initialized Array

print(arr[0] ) # printing 1st element
print(arr[1] ) # printing 2nd element
👍5
in Python array doesn't exists but
You can import its functionality by

Writing this 👇
import array

And use array like this format 👇
variable_name = array(typecode,[elements])
Here You can see type code used in virtual array

Array declaration 👇(also import this module)
variable_name = array(typecode,[elements])
👍1
#6 Arrays in Python (virtual)

import array as arr

numbers = arr.array('i',[10,20,30])

print(numbers[0]) # gets the 1st element
print(numbers[1]) # gets the 2nd element
print(numbers[2]) # gets the 3rd element

#output

#10
#20
#30
👍7👏1
Jiske pass Laptop nhi hai 👇
Mobile best Compiler's

C Compiler Click Here
C++ Compiler Click Here
Python Compiler Click Here
Java Compiler Click Here
Sql Compiler Click Here

Universal Compilers for mobile

Replit (web or app) Click Here
Jdoodle(web or app) Click Here
Programize (web) Search web

For any help Freely Say here
👍2
Now you can compile your codes by @CodeCompiler_bot

Come in @IO_Coding or @bca_group_pro for Compilation of your code
"""
Pattern:
  * * * *
   * * *
    * *
     *
     *
    * *
   * * *
  * * * *
"""

n = int(input("Enter no.: "))
for i in range(1, n):
          print(" " * i , "* " * (n-i))
         
for i in range(1, n):
          print(" " * (n - i ), "* " * i)       
                   
# @Python_Codes_Pro
👍11