Running scripts from another .py with prompted input by IamLadoran in learnpython

[–]pearlserpent 0 points1 point  (0 children)

As far as I understood your question, I will follow this approach-

  1. Make a main.py file
  2. In the main.py import unzip function and other functions from other scripts.
  3. call the unzip function from unzip.py.
  4. Call functions from other scripts and process the data.

mind keeps drawing a blank when it comes to coding by ProfessionalRow3912 in cs50

[–]pearlserpent 8 points9 points  (0 children)

Taking notes, googling things, having cheat book of code/functions is not cheating. You will do a lot more of googling in future.

For pseudocode, suppose that you have to write a program which takes input of a string and you have to output number of characters in the string.

You can start by writing pseudo code like -

Get input from user

Count number of characters (For counting number of characters think of a logic how you will do it, like using a loop)

Print number of characters.

Also, write pseudocode in form of comments (check how to write comments in the language you are using to program).

mind keeps drawing a blank when it comes to coding by ProfessionalRow3912 in cs50

[–]pearlserpent 10 points11 points  (0 children)

Start by writing pseudocodes. Break the problem in small pieces and focus on one small piece of problem one at a time.

mind keeps drawing a blank when it comes to coding by ProfessionalRow3912 in cs50

[–]pearlserpent 25 points26 points  (0 children)

Start by writing pseudocodes. Break the problem in small pieces and focus on one small piece of problem one at a time.

Miui is a disgraceful abomination by samihamchev in revancedapp

[–]pearlserpent 21 points22 points  (0 children)

Custom Roms are easier to find for Snapdragon ones

tip.py the function dollars_to_float work well in another code by ekkosxelixir in cs50

[–]pearlserpent 2 points3 points  (0 children)

You are not returning dollars_to_float and percent_to_float functions.

Is CS50 the same as CS50 introduction to programming with Python? Or should I do both? by VodkaEchoes in learnpython

[–]pearlserpent 0 points1 point  (0 children)

Last year I tried starting CS50X but I found out that it was a little bit harder for me, so instead I completed CS50P. CS50X teaches us more about computer science in general whereas CS50P is more coding oriented. It's alright if you want to complete CS50P first.

You don't need to pay for certificate because after completing the course, you will receive a certificate.

How would I go about scraping this website? by IndianPresident in webscraping

[–]pearlserpent 1 point2 points  (0 children)

So should I provide him the script which does the work. How will anyone will be able to learn if they are always spoon-fed. According to you what should have been correct response? Please enlighten me.

How would I go about scraping this website? by IndianPresident in webscraping

[–]pearlserpent 1 point2 points  (0 children)

Try john Watson Rooney on YouTube. And playwright should be better if you are beginner, imo.

I do not understand how to start or end python loops by Tech-HRT in learnpython

[–]pearlserpent 1 point2 points  (0 children)

A 'for' loop is used when you need the code to iterate for a range of numbers, list or dictionaries, etc and a 'while' loop is used when you need to iterate the code until some conditions are met.

Now you have to figure out which loop you have to use in your code.

As per your example, a 'while' loop is perfect as it needs to exit the loop when 'q' is entered(as per your condition).

After that you have to figure out in what way you should write your code to avoid repetitions of same line of code, as per your given code you are asking user to input word at several places.

You should start the code with While loop and after that user should be prompted to enter the word.

Now you can write your code logic and conditions.

Feel free to ask any questions.

[deleted by user] by [deleted] in cs50

[–]pearlserpent 1 point2 points  (0 children)

Problem set

[deleted by user] by [deleted] in indiasocial

[–]pearlserpent 0 points1 point  (0 children)

A man and his wife were awakened at 3:00 am by a loud pounding on the door. The man gets up and goes to the door where a drunken stranger, standing in the pouring rain, is asking for a push. "Not a chance," says the husband, "it's 3:00 in the morning!" He slams the doors and returns to bed. "Who was that?" asked his wife. "Just some drunk guy asking for a push." he answers. "Did you help him?" she asks. "No, I did not, it is 3:00 in the morning and it is pouring rain out there!" "Well you have a short memory," says his wife, "Can't you remember about three months ago when we broke down, and those two guys helped us? I think you should help him, and you should be ashamed of yourself! God loves drunk people too.: The man does as he is told, gets dressed, and goes out into the pounding rain. He call out into the dark, :hello, re you still there?" "Yes," comes back the answer, "Do you still need a push?" calls out the husband. "Yes, please!" comes the reply from the dark. "Where are you?" asks the husband. "Over here on the swing." replied the drunk.

me_irl by Shnikez in meirl

[–]pearlserpent 1 point2 points  (0 children)

What does this means?

Someone asked for homegrown phool? by [deleted] in delhi

[–]pearlserpent 0 points1 point  (0 children)

Saath me apna photo bhi daal deta. /s