Please watch: "Object Oriented Programming With Python Hindi - Full Course For Beginners "
• Object Oriented Programming With Python Hi... -~-
Welcome to our Python programming course, In this video you will learn how to create Dynamic Array Takes Input From User and Fetch Index and Search Values in Arrays.
In this talk we will learn:
How to create an empty array?
How to create an array by user input?
Creating an array of user values
How to find an element in an array?
Function to get the index value of an element in python
#1
We can also create an empty array and get its values from the user.
First, we need to pass the length of an array to the user.
The input() function takes the value as a string, so we have to convert it to an integer using int().
A loop can be created in the range of the user-supplied length of the array. At each iteration, we can take a value and insert it into the array.
append() is a function used to add a value or element to an array.
#2
To find any value in the array or to check the index number of the value, the value of the iterative variable needs to be incremented at each iteration.
If the comparison condition is true, we stop the loop to iterate again and print the value of the iterative variable.
The recursive variable will return the index number of the value, which you searched for.
#3
The index() function can also be used to get the index number of the value in the array.
#To Create Dynamic Array Takes Value User, Searching in Array
from array import *
vals = array("i", [])
nums = int(input("Enter The Size of Array : "))
for i in range(nums):
temp = int(input("Enter the Value of Array :"))
vals.append(temp)
print(vals)
Searching of a Value in Array
tst = int(input("Enter the Value For Search"))
k = 0
for i in vals:
if i == tst:
print(f"{tst} is Found")
print(f"{tst} Index = {k}")
break
k += 1
else:
print("Not Found")
print(vals.index(tst))
🔗 Links:
🖇️ IDE : https://www.jetbrains.com/edu-product...
🖇️ Python Download : https://www.python.org/downloads/
If you find this video helpful, please like, share, and subscribe for more Python tutorials throughout the year. Join us on this exciting Python programming journey, and let's start coding! 🚀💻🐍
You can also find other Playlist from my channel here: 🔗
📌jQuery Tutorial : • jQuery Tutorial Beginner
📌HTML Tutorial : • HTML Tutorial
📌CSS Tutorial : • CSS Tutorial
You can also find other Playlist from my channel here: 🔗
🔥jQuery Complete One Video : • jQuery Advance Full Course - Projects + Ex...
🔥JavaScript Complete One Video : • Complete JavaScript Tutorial in Hindi One ...
🔥Microsoft 365 Free : • How to Get Microsoft 365 for Free: Genuine...
🔥Optimize LinkedIn : • Mastering LinkedIn Profile Optimization: E...
You can also follow me on social media for more updates: 🔗
👻YouTube: / itsmohitprajapat
👻LinkedIn: / itsmohitprajapat
👻Instagram: / itsmohit.codes
👻GitHub: https://github.com/mohitprajapat2001
If you find this tutorial helpful, don't forget to like, share, and subscribe for more Python tutorials in our 2023 series. Stay tuned for upcoming videos covering more advanced Python topics. Happy coding! 🚀💻🐍
.
I hope you enjoy the video! 👍
.
🔗 Timestamps:
00:00 - Introduction
01:19 - Previously
03:12 - Dynamic Array
07:20 - Searching in Array
14:35 - Check Out More !
.
Tags : #mohitprajapat #pythontutorial, #pythontutorialforbeginners, #pythontutorialbangla, #pythontutorialforbeginnersinhindi, #pythontutorialcodewithharry, #pythontutorialintamil, #pythontutorialfreecodecamp, #pythontutorialforbeginnersintelugu, #pythontutorial2023, #pythontutorialforbeginnersintamil, #pythontutorialplaylist, #pythontutorialfrançais, #pythontutorialbrocode, #pythontutorialforbeginnersinenglish, #pythontutorialvscode, #pythontutorialand, #pythontutorialandroid, #pythontutorialmalayalam, #pythontutorialtagalog, #pythontutorialedureka
Информация по комментариям в разработке