Загрузка...

🐍🎮Day 34 Learning Python | - Number Guessing Game 🎮🐍 #python #coding #learnpython #pythonlearning

🎮 Python Number Guessing Game 🔥 | Day 34 Learning Python

Python can make real games 😳

In Day 34 of the Learning Python series, we built a Number Guessing Game using the random module.

Python secretly chooses a number… and the player tries to guess it.

This is one of the first projects that feels like a REAL game 🎯

💻 Code

import random

number = random.randint(1, 10)

guess = int(input("Guess: "))

if guess == number:
print("YOU WIN!")
else:
print("TRY AGAIN")

🔥 What You Learned

import random

randint()

Taking user input

if else conditions

Building your first Python game
Day 35: Lists + Conditions 🔥

#python #coding #learnpython #pythonforbeginners #programming #pythongame #codingchallenge #pythonproject

Видео 🐍🎮Day 34 Learning Python | - Number Guessing Game 🎮🐍 #python #coding #learnpython #pythonlearning канала Pythondex
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять