Skip to content

Python Journey

My Coding Blog

Menu
  • Links
Menu

Tag: time

Python Project1: Guess Number

Posted on December 31, 2024 by coden00b

Code: import random import time correctanswer = random.randint(1,20) guesscount = 1 print(“I will be selecting numbers between 1 and 20”) print(“Picking a number…”) time.sleep(2) guess = int(input(“Guess a number: “)) while guess != correctanswer:     guesscount += 1     if guess < correctanswer:         guess = int(input(“You need to make…

Read more

Recent Posts

  • Python Project1: Guess Number
  • The Zen of Python
  • Python>>String Interpolation and Formatting
  • Python>>String Methods
  • Python>>String Concatenation

Archives

  • December 2024
  • January 2023
  • August 2022

Tags

.format attributes concatenation count data type find float fstring guess indexing interpolation len lower methods number project python random replace slicing string strings template time upper zen
© 2025 Python Journey | Powered by Minimalist Blog WordPress Theme