#πŸ”’ Learning to make flow chart

17 messages Β· Page 1 of 1 (latest)

manic oasis
#
# This is a guess the number game.
import random
secret_number = random.randint(1, 20)
print('I am thinking of a number between 1 and 20.')

# Ask the player to guess 6 times.
for guesses_taken in range(1, 7):
    print('Take a guess.')
    guess = int(input('>'))

    if guess < secret_number:
        print('Your guess is too low.')
    elif guess > secret_number:
        print('Your guess is too high.')
    else:
        break  # This condition is the correct guess!

if guess == secret_number:
    print('Good job! You got it in ' + str(guesses_taken) + ' guesses!')
else:
    print('Nope. The number was ' + str(secret_number))

can you help me improve my flowchart making skills

trail belfryBOT
#

@manic oasis

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

mighty laurel
#

where branches are conditional you should put the condition over the arrow instead of in the box

manic oasis
#

what do i write there

mighty laurel
#

because the condition is why the transition happens, not part of the resultant state

#

arrows are transitions, boxes are states

manic oasis
#

i didnt get what you are saying

mighty laurel
#

you'll have to ask a more specific question

manic oasis
#

what should i write in the parallelogram

#

i get it that you are saying the conditional on the arrow rather than in a box

#

but idk what should i write in it

#

on searching on net it is saying the parallelogram should have input and output

mighty laurel
#

"more than the selected number" is a condition you'd put on an arrow, not in a box

#

are you talking about a uml flowchart?

manic oasis
trail belfryBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.