This video covers the top 10 Python programs useful to Python beginners.
These programs will help to start the Python journey. Practice with these programs will help beginners understand basic Python syntax.
Refer to the following video to learn how to use IDLE, Google Colab, and Jupyter Notebook software.
(1) How to Run First Python Program using IDLE: • How to Run First Python Program using IDLE
(2) How to use Google Colab for Python programming: • How to use Google Colab for Python Program...
(3) How to use Jupyter Notebook Online for Python: • How to use Jupyter Notebook Online for Python
Following is the code of the Python programs discussed in this video. You may copy this code to avoid typing mistakes while executing it on your computer.
1. Python program to print "Welcome" message.
print("Welcome Students")
2. Python program to read and print your name and address. Objective: To learn use of input() and Python Variables.
name = input("Enter your name:")
address = input("Enter your address:")
print(name)
print(address)
3. Python program to display Good Morning message based in given time. Objective: To learn "if" Statement
time = int(input("Enter time:"))
if time ⋖12:
print("Good morning")
if time ⋗=12:
print("Good day")
4. Python program to display Good Morning message based in given time. Objective: To learn "if..else" Statement
time = int(input("Enter time:"))
if time⋖12:
print ("Good Morning...")
else:
print("Have a nice day...")
5. Python program to print "Hello" message 5 times. Objective: To learn "for" loop statement
for i in range(5):
print ("Hello")
6. Python program to print 1 to 10 numbers.
for i in range(11, 21):
print (i, end=" ")
Code by Self Study Tutorials.
7. Python program to print 10 to 1 numbers.
for i in range(10, 0, -1):
print (i, end=" ")
8. Python program to print A to Z using for loop.
for i in range(65,91):
print(chr(i), end=' ')
9. Python program to print 1 to 10 using while loop. Objective: To learn "while" loop
number = 1
while (number ⋖= 10):
print(number)
number = number + 1
Code by Self Study Tutorials.
10. Python program to print a word of corresponding number. Objective: To learn Python if-elif-else.
number = int(input("Enter number in range of 1 to 5:"))
if (number == 1):
print ("One")
elif (number == 2):
print ("Two")
elif (number == 3):
print ("Three")
elif (number == 4):
print ("Four")
elif (number == 5):
print ("Five")
else:
print ("It’s not in range of 1 to 5")
* * * * * * * * * *
NOTE: Make sure that angular brackets (Less than and Greater than are copied properly while using this code.
* * * * * * * * * *
#python #pythonprogramming #pythonbeginners
Video Chapters:
0:00 Introduction to Top 10 Python Programs for Beginners
0:14 Software requirements for Python
0:47 First Python Program
1:32 Python Program to Read and Print Name and Address
3:48 Program to display Good Morning message (Python if statement)
5:58 Python program to understand if else statement
7:15 Program to print Hello 5 times
8:12 Program to print 1 to 10 using for loop
9:07 Python program to print 10 to 1
10:25 Python program to print A to Z
11:20 Program to print 1 to 10 using while loop
12:07 Program to print a word of a given number
Sur cette page du site, vous pouvez voir la vidéo en ligne Top 10 Python Programs for Beginners durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Self Study Tutorials 07 juillet 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,514 fois et il a aimé 46 téléspectateurs. Bon visionnage!