Skip to main content

Command Palette

Search for a command to run...

Python Projects for Beginners

Updated
•1 min read•View as Markdown
A

Senior Software Engineer from India.

In this blog post, we will learn how to develop 10 simple and interesting Python projects for beginners.

Dice Roll Simulator

Python concepts used: modules, conditions and loops

# Dice roll simulator
import random

while True:
    print('1. Roll the dice\n2. Exit')
    choice = int(input())
    if choice == 1:
        num = random.randint(1, 6)
        print(f'Random number: {num}')
    else: 
        break

If you like learning from YouTube videos: https://youtu.be/FHwH5fYTnlY

Guess the Numbers

Python concepts used: modules, conditions ,loops and userinput

# Guess the number game
import random
number = random.randint(1, 10)

for i in range(1, 4):
    user = int(input('Guess the number: '))
    if user == number:
        print('Great!! You gusssed the number right')
        break
    else:
        print('sorry!! Incorrect guess')

print('Correct number is: ', number)

YouTube video: https://youtu.be/aXAcclwmNDQ

Working on remaining projects and will update as soon as they are ready

More from this blog

Afiz

9 posts