Go! review my python - guess the number code! |

review my python - guess the number code!

2021.08.01 02:31 randmeister23 review my python - guess the number code!

Hi guys,
beginner coder here. Using python. Would appreciate if you could give me insights and improvement ideas into my "guess the number" code

import random print("Welcome to Guess the Number") print("Choose your level") print("1. Easy - 1 to 10") print("2. Medium - 1 to 100") print("3. Hard - 1 to 500") print("0. Exit")
def play_easy(): print("Easy level. You have 5 guesses.") attempt = 0 while attempt <= 4: player_guess = int(input("Your guess: ")) num_guess(player_guess) attempt += 1 if player_guess == choice: print("You guessed the number in " + str(attempt) + " attempt/s") break elif attempt > 4: print("You lost. The number was " + str(choice)) break def play_medium(): print("Medium level. You have 10 guesses.") attempt = 0 while attempt <= 9: player_guess = int(input("Your guess: ")) num_guess(player_guess) attempt += 1 if player_guess == choice: print("You guessed the number in " + str(attempt) + " attempt/s") break elif attempt > 9: print("You lost. The number was " + str(choice)) break def play_hard(): print("Hard level. You have 15 guesses.") attempt = 0 while attempt <= 14: player_guess = int(input("Your guess: ")) num_guess(player_guess) attempt += 1 if player_guess == choice: print("You guessed the number in " + str(attempt) + " attempt/s") break elif attempt > 14: print("You lost. The number was " + str(choice)) break def num_guess(guess): if guess > choice: print("Number is smaller than " + str(guess)) elif guess < choice: print("Number is greater than " + str(guess)) elif guess == choice: return print("Your guess was correct. The number was " + str(choice))
entry_valid = True while entry_valid: try: difficulty_level = int(input("Difficulty level: "))
if difficulty_level == 0: print("Game exited") break if 1 <= difficulty_level <= 3: if difficulty_level == 1: easy_range = range(1, 10) choice = random.choice(easy_range) play_easy() elif difficulty_level == 2: medium_range = range(1, 100) choice = random.choice(medium_range) play_medium() elif difficulty_level == 3: hard_range = range(1, 500) choice = random.choice(hard_range) play_hard() else: print("Invalid input, kindly try numbers 0 - 3") except ValueError: print("Integers from menu only!")
submitted by randmeister23 to code [link] [comments]


2021.08.01 02:31 kJ2Y19HOStlBpKGSlBDK PR Application Question - Does current visa status affect application method?

I'm currently on a professor visa, but hope to apply for PR as the spouse of a Japanese national. Does this matter (should I only apply for spouse PR if I'm on a spouse visa)?
submitted by kJ2Y19HOStlBpKGSlBDK to japanlife [link] [comments]


2021.08.01 02:31 PapayaRaija Told my grandfather everything…

This is long and I’m emotionally exhausted so hopefully it makes sense….
I’m still quite close with my maternal grandfather (nMom’s dad), and we talk fairly often. My Nmom still talks to him too, and I have no idea what she says to him. I don’t ask and he doesn’t tell me….it’s a great setup. Also, I’ve been NC with both my parents-nDad for a year and some change, nMom for about 6 months.
So tonight on the phone, out of the blue he asked when I talked to my mom last. I said, “Oh, awhile” and then changed the subject. He brought it up again, saying I really needed to call her (which, is the first time this has ever happened). I flat out said no, and he told me to remember how much she cared for me as a kid.
That’s when I started sobbing and told him everything.
1) I have cPTSD from the abuse (abuse that happened and still happens) 2) breaking contact with my parents was my last choice, after a decade of therapy and meds I finally couldn’t handle their abuse anymore 3) My final conversation with them was to ask them to stop screaming at me, screaming at each other in front of me, and stop manipulating me. 4) I desperately want a relationship with my parents, but sadly this was my only option that saved my sanity.
He was shocked and so supportive . He told me how much he loved me and how I needed to remember that I could call him anytime, and that he’s there for me.
Y’all, I feel so much relief.
Yet, I’m also terrified because my nMom still speaks to him regularly (she’s very close with him too), and I don’t know how this is going to change the dynamic.
Any advice, love or personal experiences would be so appreciated 💕
submitted by PapayaRaija to EstrangedAdultChild [link] [comments]


2021.08.01 02:31 Indoraptor830 [BMW M4 GTS] spotted in Southbank yesterday. Only 25 in the country.

submitted by Indoraptor830 to spotted [link] [comments]


2021.08.01 02:31 The_real_NukaBoy Showing to astronaut fans my design

Got question about showing my astronaut design to users. I have designed a cool astronaut design and I want to show here but, it consider as a promotional use right?
submitted by The_real_NukaBoy to AskAstrophotography [link] [comments]


2021.08.01 02:31 fnscarcasm Finally got to take out my build for the first time last night. This thing cleans house!!

Finally got to take out my build for the first time last night. This thing cleans house!! submitted by fnscarcasm to AAP01owners [link] [comments]


2021.08.01 02:31 RealCobaltCanine JU from r/mildlyinfuriating, this mod is awful, and has single handedly destroyed what this sub used to be, fuck u/awkwardtheturtle, fuck the fact that they're a powermod and can't get removed.

JU from mildlyinfuriating, this mod is awful, and has single handedly destroyed what this sub used to be, fuck u/awkwardtheturtle, fuck the fact that they're a powermod and can't get removed. submitted by RealCobaltCanine to JustUnsubbed [link] [comments]


2021.08.01 02:31 Jamster_1988 A wild Karen appears!

A wild Karen appears! submitted by Jamster_1988 to MandJTV [link] [comments]


2021.08.01 02:31 No_Bumblebee649 is this bad?

is it bad if my boyfriend wanted to have sex and i said “i’m not in the mood but you can do it if you want” and he had sex with me. he made sure to ask me i was ok but i said before hand i wasn’t in the mood. he kept complaining that it felt like i was a prostitute or something but kept going. so did he do something wrong or did i (by saying he could do it if he wanted)
submitted by No_Bumblebee649 to relationship_advice [link] [comments]


2021.08.01 02:31 DiverGuy1982 1970s Kona Hawaii - Big Island Travelogue Stock Footage

submitted by DiverGuy1982 to kona [link] [comments]


2021.08.01 02:31 chutz748 New Incremental Design Tool Coming Next Week!

NEW INCREMENTAL DESIGN TOOL COMING NEXT WEEK!
Have you ever wanted to create Incremental Games but were stopped by your lack of coding skills and understanding of how the elements of the game should be structured as well as how they relate to each other?
My new tool allows creators to define currencies, producers, upgrades, achievements, and prestiges. With a few clicks, the appearance of individual elements within the game can be altered. Additionally, interactive instructions are provided that explain what each element does and which options are available to the creator.
If you are interested in beta testing this new tool, please sign up at https://www.incrementaldesigntool.com/beta as soon as possible, as there are a limited number of beta accounts.
submitted by chutz748 to incremental_games [link] [comments]


2021.08.01 02:31 Bin2Good Does HGA grade tcg now?

Like Pokémon and YuGiOh?
submitted by Bin2Good to HGAslabs [link] [comments]


2021.08.01 02:31 bicicletadogtasander I'm really confused between the two of this builds, and are builds i really enjoy

View Poll
submitted by bicicletadogtasander to falloutnewvegas [link] [comments]


2021.08.01 02:31 TheFleshHive On handling massacres

Hello friends, im currently running a scenario un wich my players are a squad trapped in a rural town that is going to try an execute them.
They all have huge firepower, and i think a massacre will occur. I cant find a way to handle this, as i think the fighting mechanics will not adapt well.
I was thinking to let my players empty their magazines and roll a dice to count the dead. And then roll to see how many people flee and how many attack. But i think there is a better way. Can you give me some advice on this?
submitted by TheFleshHive to callofcthulhu [link] [comments]


2021.08.01 02:31 Kryptofreak1984 Emmanuelle Chriqui [Superman & Lois]

Emmanuelle Chriqui [Superman & Lois] submitted by Kryptofreak1984 to DC_Marvel_Ladies [link] [comments]


2021.08.01 02:31 JAS_21 For a bachelorette party.... We aim to please.

submitted by JAS_21 to KitchenConfidential [link] [comments]


2021.08.01 02:31 Sadfatlesbian Keratin pearls?

Female 19 not sexually active. Don’t smoke cigarettes but smoke weed.
I was never taught to lift and clean under my clitoral hood and I really didn’t know I had one until this year. This year was the first time I ever really inspected and there were 2 bumps on my clit to begin with. One of them disappeared (separated into clumps), but one is still left. It seems to have nerve endings because I tried poking with needle but I could feel it. I have an appointment soon but I am still desperately trying to find answers. I do believe it could be a keratin pearl due to built up smegma. I also do have some pins and needles sensation or like there is something in my hood constantly.
submitted by Sadfatlesbian to WomensHealth [link] [comments]


2021.08.01 02:31 XXCodeGamerXX Stupid ideas I had

(These are def garbage ideas, I dunno which tag to use for a satire role idea, if your expecting balanced ideas, than you probably should’ve checked the title
Democratic - Neutral Chaos
Basic defense and powerful attack
Whoever you voted before night comes will be attacked by you
You must kill 3 people that have at least voted guilty or abstain on a evil person (specifically those who are bias towards against town like exe, mafia, coven, and Nk)
Stalker - Neutral Killing
Basic defense and basic attack
The person you targeted will kill whoever they visited, basically if you visited A and A visited B, B will die but you’ll not be shown visiting B but still be seen by Lo visiting A
However if they visit you, you will die
However you may may the option to kill your target instead once
Robber - Neutral Evil
You have a target (similar to exe and ga) to rog
Once night comes,
You have a list of roles to choose from (similar to a forger)
However you must pick the role that they have
They will know they have a robber on them but not who it is
This forces them to be careful about claiming
Tho a Ti may force them to
If you successfully guess their role, you will steal their item, making them unable to use their ability
You may not have any unique role as your target (Mayor, Jailor, Godfather, etc)
submitted by XXCodeGamerXX to TownofSalemgame [link] [comments]


2021.08.01 02:31 ncvbn Some people think physical violence can often be an appropriate response to verbal insults, other people think it it virtually never is, and both sides (it seems) are shocked by the other side. Are there any studies on the mentalities involved here?

I remember reading something about Southern honor culture studies done by Richard Nisbett. Is there anything about this particular issue physical violence in response to verbal insults? Thanks!
submitted by ncvbn to AcademicPsychology [link] [comments]


2021.08.01 02:31 Zealousideal-Bad-702 War thunder - M4A3E2 (one unlocked after M6A1)

Just finished researching the M4A3E2 Sherman and saving lions to buy it. Anyone got any tips for it? Would be greatly appreciated.
submitted by Zealousideal-Bad-702 to Warthunder [link] [comments]


2021.08.01 02:31 OfficeMaster462 Dead Hard Lag on PC

I know dead hard has been freezing ppl on console, but it's been happening to me now on PC. Is anyone else experiencing this? I'm not sure how to fix it unless it's just a general problem.
submitted by OfficeMaster462 to deadbydaylight [link] [comments]


2021.08.01 02:31 Collin_C2 hololive ERROR

hololive ERROR submitted by Collin_C2 to Hololive [link] [comments]


2021.08.01 02:31 five5time7 (No spoiler)Scanner room complaints

I’m getting real tired of looking for data boxes and finding ones I’ve already found. I think there needs to be a feature that gets rid of the ones you found from the scanner room map
submitted by five5time7 to subnautica [link] [comments]


2021.08.01 02:31 TooHigh2Die420 Those retro uniforms look so smooth! Go Rays!

Those retro uniforms look so smooth! Go Rays! submitted by TooHigh2Die420 to tampabayrays [link] [comments]


2021.08.01 02:31 DontAllowMe000 $10 PayPal Giveaway! Very Easy to Enter! This is not a scam. I'm not a bot. Please no harsh words. I'll respond to every comment to prove I'm not a bot.

$10 PayPal Giveaway! Very Easy to Enter!
Hello, I am proud to announce that Shortcutvideo will be having its first giveaway! Shortcutvideo is a social media created by me and my brother! I am 16 years of age and my brother is 14 years old! All you need to do is create an account and leave your username below in the comments and you will automatically be entered in the raffle! The raffle automatically ends once we get 100 members! Happy account creating!
This is not a scam. I'm not a bot. Please no harsh words. I'll respond to every comment to prove I'm not a bot.
submitted by DontAllowMe000 to teenagers [link] [comments]


http://ryazangtn.ru/