Skip to main content
spelling error
Source Link
Linny
  • 10.4k
  • 5
  • 37
  • 99

They both do the same thing. It's useup to you which one you want to use.

They both do the same thing. It's use to you which one you want to use.

They both do the same thing. It's up to you which one you want to use.

Fixed issues Matthieu M. pointed out
Source Link
Linny
  • 10.4k
  • 5
  • 37
  • 99
def favorite_youtuber():

    youtube_response = {
        'dr. phil': 'You are an awesome lad!',
        'james charles': 'Errmm. Ok...',
        'bloamz': 'Ok then.',
        'ali a': 'I mean. Thats old but ok...',
        'jacksepticeye': 'Thats kinda cool',
        'will smith': 'Thats diferent. I rate that.',
        'jack black': 'You have good taste.',
        'jack white': 'I like him as well.',
        'dr. mike': 'So you like learning then!',
        'morgz': 'I mean just leave now.'
    }
    # Since some youtubers in the list below are not included in the dictionary, I left the list. #
    my_favorite_youtubers = ['Dr. Phil', 'Mr. Beast', 'T-Series', 'PewDiePie', '5 Minute Crafts', 'The Ellen Show']

    youtuber = input('Enter your favourite youtuber:  ').lower()

    if youtuber in youtube_response.keys():
        print(youtube_response[youtuber])
    else:
        print('I dont know that one. Ill check them out.')

    print(f'My favourite youtuber is {random.choice(my_favorite_youtubers)}!')
if youtuber in youtube_response.keys():
def run_app():
    while True:
        favorite_youtuber()
        again = input("Play again? (Y/N)").lower()
        while again.lower() not in "yn":
            print("Please enter Y/N!")
            again = input("Play again? (Y/N)").lower()
        if again == "n":
            break
    print("Thank you for using this app!")
def favorite_youtuber():

    youtube_response = {
        'dr. phil': 'You are an awesome lad!',
        'james charles': 'Errmm. Ok...',
        'bloamz': 'Ok then.',
        'ali a': 'I mean. Thats old but ok...',
        'jacksepticeye': 'Thats kinda cool',
        'will smith': 'Thats diferent. I rate that.',
        'jack black': 'You have good taste.',
        'jack white': 'I like him as well.',
        'dr. mike': 'So you like learning then!',
        'morgz': 'I mean just leave now.'
    }
    # Since some youtubers in the list below are not included in the dictionary, I left the list. #
    my_favorite_youtubers = ['Dr. Phil', 'Mr. Beast', 'T-Series', 'PewDiePie', '5 Minute Crafts', 'The Ellen Show']

    youtuber = input('Enter your favourite youtuber:  ').lower()

    if youtuber in youtube_response.keys():
        print(youtube_response[youtuber])
    else:
        print('I dont know that one. Ill check them out.')

    print(f'My favourite youtuber is {random.choice(my_favorite_youtubers)}!')
if youtuber in youtube_response.keys():
def run_app():
    while True:
        favorite_youtuber()
        again = input("Play again? (Y/N)")
        while again.lower() not in "yn":
            print("Please enter Y/N!")
            again = input("Play again? (Y/N)")
        if again == "n":
            break
    print("Thank you for using this app!")
def favorite_youtuber():

    youtube_response = {
        'dr. phil': 'You are an awesome lad!',
        'james charles': 'Errmm. Ok...',
        'bloamz': 'Ok then.',
        'ali a': 'I mean. Thats old but ok...',
        'jacksepticeye': 'Thats kinda cool',
        'will smith': 'Thats diferent. I rate that.',
        'jack black': 'You have good taste.',
        'jack white': 'I like him as well.',
        'dr. mike': 'So you like learning then!',
        'morgz': 'I mean just leave now.'
    }
    # Since some youtubers in the list below are not included in the dictionary, I left the list. #
    my_favorite_youtubers = ['Dr. Phil', 'Mr. Beast', 'T-Series', 'PewDiePie', '5 Minute Crafts', 'The Ellen Show']

    youtuber = input('Enter your favourite youtuber:  ').lower()

    if youtuber in youtube_response:
        print(youtube_response[youtuber])
    else:
        print('I dont know that one. Ill check them out.')

    print(f'My favourite youtuber is {random.choice(my_favorite_youtubers)}!')
if youtuber in youtube_response:
def run_app():
    while True:
        favorite_youtuber()
        again = input("Play again? (Y/N)").lower()
        while again not in "yn":
            print("Please enter Y/N!")
            again = input("Play again? (Y/N)").lower()
        if again == "n":
            break
    print("Thank you for using this app!")
Post Merged (destination) from codereview.stackexchange.com/questions/236090/…
added 16 characters in body
Source Link
Linny
  • 10.4k
  • 5
  • 37
  • 99
def run_app():
    while True:
        favorite_youtuber()
        again = input("Play again? (Y/N)")
        while again.lower() not in "yn":
            print("Please enter Y/N!")
            again = input("Play again? (Y/N)")
        if again == "n":
            break
    print("Thank you for using this app!")
def run_app():
    while True:
        favorite_youtuber()
        again = input("Play again? (Y/N)")
        while again not in "yn":
            print("Please enter Y/N!")
            again = input("Play again? (Y/N)")
        if again == "n":
            break
    print("Thank you for using this app!")
def run_app():
    while True:
        favorite_youtuber()
        again = input("Play again? (Y/N)")
        while again.lower() not in "yn":
            print("Please enter Y/N!")
            again = input("Play again? (Y/N)")
        if again == "n":
            break
    print("Thank you for using this app!")
Source Link
Linny
  • 10.4k
  • 5
  • 37
  • 99
Loading