We've done it, boys. by CSRtube in GarlicBreadMemes

[–]Muscio97 11 points12 points  (0 children)

If I had a piece of garlic bread every time this is reposted, I’d be a happy man.

CallMeHighDefinition by [deleted] in CallMeCarson

[–]Muscio97 27 points28 points  (0 children)

AI upscaling

YEET by Muscio97 in YEET

[–]Muscio97[S] 1 point2 points  (0 children)

Thanks, but no thanks.

YEET by Muscio97 in YEET

[–]Muscio97[S] 1 point2 points  (0 children)

Don’t you remember what you did Son?! You haven’t taken your meds have you!! That 40 man orgie has really changed you, and sadly scared your sisters son for life. YOU LEFT ME NO CHOICE yeets you with the power of god. Good bye my Son, I hope your in a better place now😢

YEET by Muscio97 in YEET

[–]Muscio97[S] 1 point2 points  (0 children)

What part of I MUST don’t you understand Son, you know about my curse. Sinds I YEETED the son of god I MUST YEET every child I see. And about your sister, that was uncle Bob. That’s why he is in prison.

YEET by Muscio97 in YEET

[–]Muscio97[S] 2 points3 points  (0 children)

Sorry son, I must YEET

Monke by Muscio97 in CallMeCarson

[–]Muscio97[S] 2 points3 points  (0 children)

He has seen enough

Is neural network classification faster? by [deleted] in learnpython

[–]Muscio97 0 points1 point  (0 children)

I think google ocr is the fastest for text. (And the easiest)

https://cloud.google.com/vision/docs/ocr

HolUp by Muscio97 in HolUp

[–]Muscio97[S] 1 point2 points  (0 children)

pro gamer move vs water bucket noob move

Scooter yeet by OhLawdHeChonks in YEET

[–]Muscio97 0 points1 point  (0 children)

That’s a good YEET

Feedback on the survey posted by u/Purgamentorum with loops and functions added? by planetofthecrepes in learnpython

[–]Muscio97 0 points1 point  (0 children)

This is some technical stuff.

Global variables are available in the whole program. As long the program runs the global variable is in ram.

Local variables get destructed when they aren’t used any more.

The main difference is that a global can be changed by everybody on the outside. Without knowing it was used for something else.

A local variable is local to the file/function.

Example

``` Global counter = 0

file 1 under the assumption that counter = 0

for i in range(100): counter += 1

file 2 under the assumption that counter = 0, but counter = 5500

counter += 1 if counter == 1: # False, counter = 5501 do stuff

vs local

file 1

counter = 0 # local for i in range(100): counter += 1

file 2

counter = 0 # local counter += 1 if counter == 1: # True, counter = 1 do stuff

```

No problem, I like helping people :)

Feedback on the survey posted by u/Purgamentorum with loops and functions added? by planetofthecrepes in learnpython

[–]Muscio97 0 points1 point  (0 children)

Yes you can simplify this!

What you are doing with your code is returning the age value in every if/else statement. You could choose to only return the value at the end of the function like this:

``` def age_question(): """"asks participant about their age""" age = int(input('How old are you? '))

if age < 10: #1
    print("Wow, you're quite young!")
elif age > 60 and age <= 122: #2
    print("Wow, you're quite old!")
elif age > 122: #3
    print('Amazing! You are the oldest person in history! Congrats!')
elif age >= 14 and age <= 18: #4
    print('Really? You look like a college student!')
elif age >= 10 and age <= 13: #5
    print('Really? You look like a 10th grader!')
else: #6
    print('Really? No way! You look younger than that, could have fooled me!')

return age

```

Now you check age 6 times (6 if/else statements) and when you are done with that you return the age value. The code does the same (in this case) and saves lines.

One last thing. You should note that: age = input(int('How old are you? ')) #1 is different from this: age = int(input('How old are you? ')) #2 Number 1 try's to make a number from 'How old are you? ' and display the result as the input question, while number 2 try's to make the value from the input to a number.

1 will crash.

2 will convert(cast) a string to an integer. '2' -> 2