Skip to content

workshop Stepan Marsik#2

Open
hadriel02 wants to merge 10 commits intoCodersLab-CZ:masterfrom
hadriel02:Stepan_Marsik
Open

workshop Stepan Marsik#2
hadriel02 wants to merge 10 commits intoCodersLab-CZ:masterfrom
hadriel02:Stepan_Marsik

Conversation

@hadriel02
Copy link

No description provided.

and react in proper way for tip <, > or ==
"""
x = input("Guess the number:")
try:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ten try block je zytecne velkej, staci vylozene try na tu oblast kde tu vyjimku cekas.

player_tip function ask player for 6 numbers from 1 to 49
with validation for range, repetition and value
"""
tip_list = []

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toto by melo byt jako set, ne jako list, protoze tam budes delat membership test a ten na setu funguje lepe

computer_tip function draw 6 different numbers from 1 to 49
"""
range_list = list(range(1, 50))
c_tip_list = []

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zase je lepsi set

computer_list = computer_tip()
matched = 0
for tip in player_list:
if tip in computer_list:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tady prave delas ty mebership testy..

min = 0
max = 1000
while round < 10:
guess = int((max - min) / 2) + min

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

necastuj, ale udelej //

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants