Output a function that is not executed Python separately

Asked 1 years ago, Updated 1 years ago, 122 views

running = true
While running:
        Guess= str("Enter the code":")
       If guess=='b2310'
           Print ('Ko Byung-jae')
       If guess=='b2321'
           Print ('Precious Award')
      If guess=='mk'
        running = false
print ('end')

If you only write b2310 and type mk in
I want "Yoo Eun-sang" to be separately "Yoo Eun-sang's absence" but I can't get the code even if I think about it for two days(Crying) I'd appreciate it if you could solve it(Crying)

if문 input print

2022-09-22 16:59

2 Answers

Are you in a situation where you're called absent for your class? I think we can do it like this.

This is what we actually do when we call attendance. So how do we do this in Python? Give it a try it!

+ Special reinforcement: I'm asking how to print out "unexecuted functions" right now, right?

→ Based on the code you posted, what you're asking is, "How do you determine that a particular value is not entered?" To do this, you need to identify a particular value in advance as a target. For example, if you only put "b2310" as an input and hit "mk", the program will know whether to treat it as "Yoo Eun-sang absent" or "Leaves absent". (It's the same if the class number of Yeopto-gun was not entered. Think about it carefully Yoo Eun-sang's school number may or may not be entered It didn't go in! Only when the program knows that it does can it shout "Yoo Eun-sang's absence". That's why the concept of attendance is introduced.


2022-09-22 16:59

Could you tell me in more detail?


2022-09-22 16:59

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.