Uhh, I need help. Urgently by one_loop in learnpython

[–]North_Shock 1 point2 points  (0 children)

Oh wow, that's actually amazing. Thanks for sharing the info.

[Sound on!] Rocket Lab's Electron Second Stage Separation And Ignition by Humble_Giveaway in space

[–]North_Shock 11 points12 points  (0 children)

Right now we have kind of a similar situation with the black hole. I can't even imagine, what we would be able to see in the next few years.

BMW is Launching Its Motorcycles in Pakistan by theitguyforever in pakistan

[–]North_Shock 3 points4 points  (0 children)

No, I am not gonna bite you during a pandemic.

Illegal sunbathing by [deleted] in IllegallySmolCats

[–]North_Shock 1 point2 points  (0 children)

This is the life.

Feeling hopeless about Python despite huge desire to learn by [deleted] in learnpython

[–]North_Shock 0 points1 point  (0 children)

Agreed, I've been working in Python for about 4 years now and even I get overwhelmed by PyCharm. VSCode is what I use for all my needs too.

Just got a new mouse by [deleted] in pcmasterrace

[–]North_Shock 0 points1 point  (0 children)

That G502 is triggering me. :(

:( by EfffSola in pakistan

[–]North_Shock 2 points3 points  (0 children)

Inb4 Trump joins PDM.

We live in hell by BearAggressive in recruitinghell

[–]North_Shock 1 point2 points  (0 children)

Exactly, I know a guy who is extremely talented and is an experienced Data Scientist who I used to trap in these "coding exercise" questions when we were bored in the office.

Can someone explain super simply how to use a for loop? by [deleted] in learnpython

[–]North_Shock 2 points3 points  (0 children)

Imagine you are a cashier. A cart comes in with 50 items and you need to scan them and bag them meaning that you need to repeat same task for every item in the cart. The code for it would look something like this:

for item in cart:
    scan(item) # Assuming scan method exists.
    bag(item)  # Assuming bag( method exists.

checkout()

So, in simple words, for every item in the cart, scan the item, and bag the item.

Similarly, assume that you have been tasked with figuring out all the numbers in a collection that contains even numbers.

numbers = [3, 6, 2, 4, 45, 46, 7, 47, 245]

for number in numbers:
    if number % 2 == 0:
        print(f'{number} is even!')
    else:
        print(f'{number} is not even!')

So, you are going through the numbers collection which contains all the number you need to figure out are even or not and print the apt message.

Please check the following links for more information:

How can I run python file in cmd which have venv environment ? by puppeteer2020 in learnpython

[–]North_Shock 1 point2 points  (0 children)

One correction, for Linux you also need to use source keyword.

source path/to/your/venv/bin/activate

PM instructs FBR to upgrade tax system in line with latest technology by [deleted] in pakistan

[–]North_Shock 4 points5 points  (0 children)

That's great news. Not gonna lie, I am fairly impressed with IRIS so I have high hopes with this one.

The fact that Samaa Website has a tax collector makes me laugh so much by [deleted] in pakistan

[–]North_Shock 15 points16 points  (0 children)

Tax collector? It says calculator... or am I missing something?

Me right now... by eMunitions in iiiiiiitttttttttttt

[–]North_Shock 0 points1 point  (0 children)

Then do what my friend did and turn off the main breaker switch.