- ๐ฑ Iโm currently learning Python Data Structures and Algorithms
sanjeev-kumar78 / state-name-game Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
In File Game.py
in line 42:
Required a hint feature that shows the text input box along with a random letter from the correct answer related to the user's incorrect input.
If anyone can suggest some ways to do that
while len(guessed_states) < 29:
# Get the answer from the user
answer_state = screen.textinput(
title=f"{len(guessed_states)}/29 States Correct", prompt="What's another state's name?").title()
# Check if the answer is correct
if answer_state in data.State.to_list():
guessed_states.append(answer_state)
t = turtle.Turtle()
t.hideturtle()
t.penup()
t.goto(int(data[data.State == answer_state].x),
int(data[data.State == answer_state].y))
t.write(answer_state, align="center", font=("Arial", 8, "normal"))
else:
if screen.textinput(title="Wrong Answer", prompt="Try Again! Enter Yes or No").title() == "Yes":
continue
else:
print("Good Bye!")
try:
turtle.Screen().bye()
break
except:
print("Exit turtle")
break
# Hint TODO: Add a hint feature
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.