Python Forum
Solving a problem need help!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solving a problem need help!
#5
(Nov-07-2020, 06:28 PM)totoandreev Wrote:
(Nov-07-2020, 06:21 PM)buran Wrote: Please, don't create multiple threads.
We are glad to hello, but you need to show some effort. Post the code you have so far, if you get error - post the full traceback. Please, use proper tags when post code, traceback, output, etc.
See BBcode help for more info.
https://pastebin.com/q8GeUj7x

friend_names = input().split(", ")
command = input().split()
lost_names = 0
def in_blacklist(blacklist, names_is):
    return True if names_is in blacklist else False
def in_friendlist(friendlist, name_is1):
    return True if name_is1 in friendlist else False
 
while not command == "Report":
    command_type = command[0]
    name = command[1]
 
    if command_type == "Blacklist":
        while not command[1]=="":
            if in_blacklist(friend_names,name):
                print(f"{name} was blacklisted")
            elif not in_friendlist(friend_names, name):
                print(f"{name} was not found.")
 
    if command_type == "Error":
        if name is not in_blacklist(friend_names,name):
            print(f"{name} was lost due to an error.")
    if command_type == "Change":
        index = friend_names[0]
        if index = 
That is what I have so far :)
Not sure if it is correct in any way shape or form. Just tried to do something but can't solve the problem

I just don't know how to continue solving it. It is a problem that I can't solve myself that's why I wanted to ask for someone's help. So they can solve it and I can look at the solution and understand it.
Reply


Messages In This Thread
Solving a problem need help! - by totoandreev - Nov-07-2020, 05:45 PM
RE: Solving a problem need help! - by buran - Nov-07-2020, 06:21 PM
RE: Solving a problem need help! - by totoandreev - Nov-07-2020, 06:28 PM
RE: Solving a problem need help! - by totoandreev - Nov-07-2020, 06:44 PM
RE: Solving a problem need help! - by buran - Nov-07-2020, 06:41 PM
RE: Solving a problem need help! - by totoandreev - Nov-07-2020, 06:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help solving Python problem WHelped 4 3,539 Apr-17-2018, 06:36 AM
Last Post: WHelped

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020