How do I make my python code more efficient and professional?

I am fairly new to programming, and I recently finished part of one of my projects, a guessing game. The part I completed was the game mode where the player guesses the computer’s number. I’m quite proud of it, but I have a strong feeling that it is hugely suboptimal, as I only really know the basics so far. I would like some feedback how to not only improve this program, but all programs I make in the future. Thank you!
P.S. Please be specific when giving feedback, because there may be some terms that I do not know.

My code:

import random
import sys
import time

#controls typing speed (I got this from online)
typing_speed = 150 #wpm
def slow_print(t):
    for l in t:
        sys.stdout.write(l)
        sys.stdout.flush()
        time.sleep(random.random()*10.0/typing_speed)
    print('')

#asks difficulty
def ask_guess_difficulty():
    slow_print('Alright! I'll pick a number from 1 to 100, and you try to guess it!')
    slow_print('''You can do easy mode (E), with infinite guesses; normal mode (N), with 10 guesses;
hard mode (H), with 5 guesses; or custom mode (C), where you pick how many guesses you get!''')
    guess_difficulty = input()
    guess_difficulty_lower = guess_difficulty.lower()
    if guess_difficulty_lower == 'e':
        guesses = 1000
        return guesses
    elif guess_difficulty_lower == 'n':
        guesses = 11
        return guesses
    elif guess_difficulty_lower == 'h':
        guesses = 6
        return guesses
    elif guess_difficulty_lower == 'c':
        slow_print('How many guesses do you want?')
        guesses = input()
        if guesses.isnumeric() == True:
            guesses = int(guesses) + 1
            slow_print('Ok! You will have ', str(guesses - 1), ' guesses!')
            return guesses
        else:
            slow_print('I don't understand. Please input a number for the amount of guess that you want.')
    else:
        slow_print('''I don't understand. Please input "E" for easy mode, "N" for
        normal mode, "H" for hard mode, and "C" for custom mode''')

#plays the gamemode where the player guesses the computer's number
def player_guess(guesses):
    guesses = int(guesses)
    player_guess_win = False
    slow_print('Ok! I'm thinking of a number from 1 to 100')
    slow_print('You'll have ', str(guesses - 1), ' guesses to get it.')
    slow_print('Go ahead and guess when you're ready.')
    total_tries = 0
    player_guess_num = random.randint(1,100)
    last_guess = None
    low_high = None
    while player_guess_win == False and guesses > 0:
        guesses -= 1
        total_tries += 1
        if int(guesses) > 0:
            current_guess = input()
            if current_guess.isnumeric() == True and int(current_guess) <= 100 and int(current_guess) >= 1:
                if int(current_guess) == last_guess:
                    slow_print('That was your last guess silly! Make sure to enter a new number!')
                    guesses += 1
                    continue
                if low_high == 'high':
                    if int(current_guess) > last_guess:
                        slow_print('Your guess is...')
                        if int(current_guess) == player_guess_num:
                            slow_print('CORRECT!')
                            slow_print('Congratulations! You took ',str(total_tries),' guesses to get it right!')
                            slow_print('Do you want to play again? (Please input "yes" or "no".)')
                            while True:
                                yn_choice = input()
                                if yn_choice == 'yes' or yn_choice == 'y':
                                    slow_print('Ok, let's do it!')
                                    guess_the_number_start()
                                    break
                                elif yn_choice == 'no' or yn_choice == 'n':
                                    slow_print('Ok!')
                                    exit()
                                else:
                                    slow_print('I don't understand. Please input "yes" or "no".')
                        else:
                            if int(current_guess) < player_guess_num:
                                slow_print('Too low.')
                                last_guess = int(current_guess)
                                low_high = 'high'
                                continue
                            else:
                                slow_print('Too high')
                                last_guess = int(current_guess)
                                low_high = 'low'
                                continue
                    else:
                        slow_print('Oops! Make sure you enter a number that is greater than your last guess!')
                        guesses += 1
                        continue
                elif low_high == 'low':
                    if int(current_guess) < last_guess:
                        slow_print('Your guess is...')
                        if int(current_guess) == player_guess_num:
                            slow_print('CORRECT!')
                            slow_print('Congratulations! You took ',str(total_tries),' guesses to get it right!')
                            slow_print('Do you want to play again? (Please input "yes" or "no".)')
                            while True:
                                yn_choice = input()
                                if yn_choice == 'yes' or yn_choice == 'y':
                                    slow_print('Ok, let's do it!')
                                    guess_the_number_start()
                                    break
                                elif yn_choice == 'no' or yn_choice == 'n':
                                    slow_print('Ok!')
                                    exit()
                                else:
                                    slow_print('I don't understand. Please input "yes" or "no".')
                        else:
                            if int(current_guess) < player_guess_num:
                                slow_print('Too low')
                                last_guess = int(current_guess)
                                low_high = 'high'
                                continue
                            else:
                                slow_print('Too high')
                                last_guess = int(current_guess)
                                low_high = 'low'
                                continue
                    else:
                        slow_print('Oops! Make sure you enter a number that is less than your last guess!')
                        guesses += 1
                        continue
                else:
                    slow_print('Your guess is...')
                    if int(current_guess) == player_guess_num:
                        slow_print('CORRECT!')
                        slow_print('Congratulations! You took ',str(total_tries),' guesses to get it right!')
                        slow_print('Do you want to play again? (Please input "yes" or "no".)')
                        while True:
                            yn_choice = input()
                            if yn_choice == 'yes' or yn_choice == 'y':
                                slow_print('Ok, let's do it!')
                                guess_the_number_start()
                                break
                            elif yn_choice == 'no' or yn_choice == 'n':
                                slow_print('Ok!')
                                exit()
                            else:
                                slow_print('I don't understand. Please input "yes" or "no".')
                    else:
                        if int(current_guess) < player_guess_num:
                            slow_print('Too low')
                            last_guess = int(current_guess)
                            low_high = 'high'
                            continue
                        else:
                            slow_print('Too high')
                            last_guess = int(current_guess)
                            low_high = 'low'
                            continue
            else:
                slow_print('I don't understand. Please enter a number from 1 to 100.')
                guesses += 1
                continue
        else:
            slow_print('You ran out of guesses. My number was ',str(player_guess_num), '.')
            slow_print('Would you like to play again?')
            slow_print('(Please input "Yes" or "No".)')
            play_again_gtn = input()
            play_again_gtn_lower = play_again_gtn.lower()
            if play_again_gtn_lower == 'y' or play_again_gtn_lower == 'yes':
                slow_print('Oki doki!')
                continue
            elif play_again_gtn_lower == 'n' or play_again_gtn_lower == 'no':
                slow_print('Oki doki! Bye!')
                exit()

#computer guesses your number (not finished yet
def computer_guess():
    slow_print('Ok, I'll guess!')
    slow_print('First, we need to figure out the span of numbers I'll be guessing')
    slow_print('What should the minimum be? The number will not be able to go any lower than this.')

#begins the program
def guess_the_number_start():
    slow_print('Do you want to guess my number, or should I guess yours?')
    slow_print('(If you want to guess, input "I". If I should guess, input "U".)')
    who_guess = input()
    if who_guess.lower() == 'i':
        guesses = ask_guess_difficulty()
        player_guess(guesses)
    elif who_guess.lower() == 'u':
        computer_guess()
    else:
        slow_print('I don't understand. Please input "I" if you should guess and input "U" if I should guess.')

#loops the program
while True:
    guess_the_number_start()

New contributor

ADAM WELLER-FAHY is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật