Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: how to use the upper()
Post: RE: how to use the upper()

In simple words I am explaining you how to solve this problem. 1. Input first sentence from the user. 2. Input second word from the user. 3. Find the word in the sentence. 4. Replace them with upperca...
Sagar Homework 5 3,993 Sep-24-2017, 03:58 PM
    Thread: Learning and Looping
Post: RE: Learning and Looping

@buran your answer reflects the experience you have got in Python and I appreciate it a lot. I learned a lot from this forum. @AnjyilLee if you want to keep the previous budget, you have to move the...
Sagar Homework 6 5,037 Sep-23-2017, 07:43 AM
    Thread: Learning and Looping
Post: RE: Learning and Looping

(Sep-22-2017, 12:27 AM)AnjyilLee Wrote: Thank you for helping! Unfortunately, when I tested your code, I had some issues. Error:Traceback (most recent call last): File "C:\Users\Sami3_000\Documen...
Sagar Homework 6 5,037 Sep-22-2017, 08:08 AM
    Thread: Learning and Looping
Post: RE: Learning and Looping

1.Define a function calculateExpense(). 2.In that function, you have to input the monthly budget and store it in budget variable. 3.Input the monthly expense and store it in expense variable. 4.Calcul...
Sagar Homework 6 5,037 Sep-21-2017, 11:50 AM
    Thread: Vowels and Consonants detector
Post: RE: Vowels and Consonants detector

You are not using "c" which is passed into the function is_vowel()
Sagar General Coding Help 5 9,788 Sep-21-2017, 10:58 AM
    Thread: loops in python
Post: RE: loops in python

You have write second for loop inside sum()
Sagar Data Science 2 3,546 Sep-21-2017, 10:52 AM
    Thread: Can some one help me with Compount interest program in python
Post: RE: Can some one help me with Compount interest pr...

Put your code and output in proper tags. rateList = [0.0115,0.013,0.015,0.016,0.0185,0.019,0.0195,0.02,0.0215,0.023] def calculateCompoundInterest(): p = float(input("Principle")) t = int(input("...
Sagar General Coding Help 3 3,535 Sep-21-2017, 06:44 AM
    Thread: Best form of iterating over a lsit of lists
Post: RE: Best form of iterating over a lsit of lists

@Larz60+ , I think @tonymcgregor is confused about the syntax of the for loops. He wants to know the differences between following three codes (I also want to know): for name, species, weight in pets:...
Sagar General Coding Help 15 7,686 Sep-19-2017, 12:01 PM
    Thread: [PyPa] Problems with Install PIP on Windows !
Post: RE: [PyPa] Problems with Install PIP on Windows !

You have to uninstall Python and reinstall it with running set as administrator and checking the add Python to path checkbox during the installation. You can refer following: https://www.reskilltoshi...
Sagar News and Discussions 7 9,758 Sep-19-2017, 08:29 AM
    Thread: Beginner Help request: Calculator
Post: RE: Beginner Help request: Calculator

First of all write your code inside Python tags. Your code is running correctly on my side.
Sagar General Coding Help 5 3,812 Sep-19-2017, 07:41 AM
    Thread: find empty cells in a column
Post: RE: find empty cells in a column

You missed double equals to sign (==) inside if conditional statement.
Sagar General Coding Help 2 23,829 Sep-18-2017, 11:46 AM
    Thread: [newbie] question on what to put in () on target.write
Post: RE: [newbie] question on what to put in () on targ...

Yes you are correct, new line character is needed to get the output as desired. target.write(line1 + "\n" + line2 + "\n" + line3)
Sagar General Coding Help 5 5,356 Sep-15-2017, 04:07 PM
    Thread: Number of cmds inside subprocess
Post: RE: Number of cmds inside subprocess

I have written a small code snippet. You could scale up and improve that code. Please let me known what you have done so I could learn from you also. The code is as follows: def subprocess_cmd(command...
Sagar General Coding Help 5 3,906 Sep-14-2017, 07:17 AM
    Thread: Number of cmds inside subprocess
Post: RE: Number of cmds inside subprocess

I think you should use _ = subprocess.call(cmd1, shell=True, stderr=subprocess.STDOUT)
Sagar General Coding Help 5 3,906 Sep-14-2017, 06:35 AM
    Thread: [newbie] question on what to put in () on target.write
Post: RE: [newbie] question on what to put in () on targ...

You could try: target.write(line+line2)
Sagar General Coding Help 5 5,356 Sep-14-2017, 06:29 AM
    Thread: Module import error
Post: RE: Module import error

First of all, please insert your code and your output inside respective tags. Secondly when you write import chaosthe name of the file in which choas code is written should be chaos.py and it should ...
Sagar General Coding Help 2 4,711 Sep-14-2017, 06:21 AM
    Thread: reading and writing to a text file help
Post: RE: reading and writing to a text file help

try this: f = open("test.txt","r+") print (f.write("hello")) f.seek(0,0) print (f.read()) f.close()
Sagar General Coding Help 4 3,787 Sep-12-2017, 12:09 PM
    Thread: How many times does it fit? help please
Post: RE: How many times does it fit? help please

Number of times the small list S[row,col] fits in the Big list A[bRow,bCol] is equal to: (bRow * bCol)/(row * col) Hope you get the idea..
Sagar Homework 2 2,910 Sep-12-2017, 11:53 AM
    Thread: what is ,*, ?
Post: RE: what is ,*, ?

I have written a code to understand the use of bare "*" in function argument list and I am sharing that with everyone. I have created a function called myFunction having three arguments "a","b" and "...
Sagar News and Discussions 24 11,861 Sep-11-2017, 09:13 AM
    Thread: radius of circle question
Post: RE: radius of circle question

The correct code probably should look like this: radius=float( input('Radius of circle: ' )) print( 'Radius of circle:' , radius , 'cm') circArea=3.1429*(radius**2) print( 'Area of Circle:' , r...
Sagar Homework 5 4,204 Sep-11-2017, 08:52 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020