Skip to content

dawdameet/DSA-Python---00

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

DSA with Python

Create Arrays (Working with For Loops)

CREATING ARRAYS WITH USER INPUT

Array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. This makes it easier to calculate the position of each element by simply adding an offset to a base value, i.e., the memory location of the first element of the array (generally denoted by the name of the array). The base value is index 0 and the difference between the two indexes is the offset. For simplicity, we can think of an array as a fleet of stairs where on each step is placed a value (let’s say one of your friends). Here, you can identify the location of any of your friends by simply knowing the count of the step they are on.

  • Remember: " Location of next index depends on the data type we use "

Alt text

Note

This is the first Repo for DSA with python.

Follow here :

#create a folder named DSA
mkdir dsa
cd dsa

mkdir Create_Array_Dynamically
cd Create_Array_Dynamically
# create the file
touch index.py

# write the code 

#run it
python index.py

About

Create Arrays (Working with For Loops)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages