TRENDING NEWS

POPULAR NEWS

Help With This. Python3.4. Anyone

Python 3 Help Strings?

I nees help with this question.

Assign decoded_tweet with user_street, replacing any occurrence of 'TTYL' with 'talk to you later'. Sample output from given program:
Gotta go. I will talk to you later.


Sample program:

user_tweet = 'Gotta go. I will TTYL.'

decoded_tweet =
print(decoded_tweet)

What should the STUDENT CODE be?

Python3 problem Help!!?

Assume the input data is structured as follows: first there is a non-negative integer specifying the number of employee timesheets to be read in. This is followed by data for each of the employees. The first number for each employee is an integer that specifies their pay per hour in cents. Following this are 5 integers, the number of hours they worked on each of the days of the workweek. Given this data, write a loop and any necessary code that reads the data and stores the total payroll of all employees into the variable total. Note that you will have to add up the numbers worked by each employee and multiply that by that particular employee's pay rate to get the employee's pay for the week-- and sum those values into total.

How can anyone help me install TkInter in Python 3.5 Windows?

In python 3 versions, tkinter is a default module..for python 2 versions you can install it by pip install tkinter..

For anyone who did "Learn Python the Hard Way", how long did it take you?

I started out with this book. I was doing good initially. I learned how to use run codes using notepad++ and windows powershell. I read 5 chapters of it, writing each programs and compiling it too. After, 2 days I realized it teaches with all the basics of the programming. I was good at programming and algorithms. Also. was in a hurry so i shifted to Python in codecademy. Completed this course in week giving 3-4 hours at nights. Then again turned to Learn Python the hard way and learned advanced topics of python. Completed it in a 5 weeks. Without Codecadmey it would have taken much more time. So, I would suggest to take this course and then study from book. It would be easier and quicker.

Is Python easy? Can I learn Python in 3 months?

Yeah, it’s very easy. Basics of Python can be learnt inside 30 days if you practice competitive coding on sites like Geeks for Geeks and Hackerrank. Python is easy because the code you write is readable. Also, it is an object oriented programming language.If you have basic knowledge of C and a little bit data structures and algorithm, you can master basics of Python quite comfortably. The syntax is quite easy to adopt to and unlike C/C++ or Java, you don’t have to worry about semicolon after every statement and curly brackets.Remember, there is no need to join any course for Python or purchase any text book for it. You can learn Python for free from any YouTube video tutorials. I learnt Python from Bucky’s Tutorials in YouTube. I recommend you to download the PyCharm software which is an IDE dedicated to Python programming. It’s available for free. Also, I recommend you to practice your syntax and skills on this IDE after completing each tutorial. If you have any doubt or you are stuck in some question, you can always ask Google or Quora. Especially, in Quora people are quite generous to help you out. So, no worries.The main domain where the language is used in Data Science and Machine Learning. There are many libraries in Python like Matplotlib, Numpy and Pandas which you can learn for data science projects after you are clear with basics.Of course, it depends upon how you code. I mean just mugging up may not help. Developing logic is important. Once you develop that, Python would look very easy. I recommend practicing on Geeks for Geeks for developing logic.Good luck!!!

Python 3: Vigenere Cipher help!!?

psydo-code:
encrypt (key, plaintext)
initalize result
for i < length of plaintext:
take the char at position i convert to an int, then add the key and convert back to a char. then append to result string.
return result

decrypt is the same thing except subtract the key value.

If you get truly desperate (edit your post) and I'll just write the code for you cuz yahoo answers is about helping your fellow man in his time of need!

update:
#420_BLAZE_IT
https://gist.githubusercontent.com/MaxBazik/26ef69391beea3ad1dc4/raw/d619cce358d5a812a36807fee6e2a9f3c2835277/gistfile1.py

p.s. "top-comment" would be really appreciated here!

PYTHON HELP - Parsing strings (Python 3)?

(1) Prompt the user for a string that contains two strings separated by a comma. (1 pt)

Examples of strings that can be accepted:
Jill, Allen
Jill , Allen
Jill,Allen
Ex:

Enter input string: Jill, Allen

(2) Report an error if the input string does not contain a comma. Continue to prompt until a valid string is entered. Note: If the input contains a comma, then assume that the input also contains two strings. (2 pts)

Ex:

Enter input string: Jill Allen
Error: No comma in string.
Enter input string: Jill, Allen

(3) Using string splitting, extract the two words from the input string and then remove any spaces. Output the two words. (2 pts)

Ex:

Enter input string: Jill, Allen
First word: Jill
Second word: Allen

(4) Using a loop, extend the program to handle multiple lines of input. Continue until the user enters q to quit. (2 pts)

Ex:

Enter input string: Jill, Allen
First word: Jill
Second word: Allen


Enter input string: Golden , Monkey
First word: Golden
Second word: Monkey


Enter input string: Washington,DC
First word: Washington
Second word: DC


Enter input string: q

***I've attached a picture of what i've got, but I keep getting a "EOFError: EOF when reading a line" error that I cannot figure out***

HELP PYTHON 3 - Parsing strings Question?

I am trying to get the following to output. I am going to attach what I've attempted, but i'm getting a "EOFError: EOF when reading a line" for line 2 when I attempt to run my program.

MY CODE:
while(True):
inp_str = input('Enter input string:')

if (inp_str == 'q'):
break;

while(inp_str.find(',') == -1):
print('Error: no comma in string')
inp_str = input('Enter input string')

parts = inp_str.split(',')
first = parts[0].strip()
second = parts[1].strip()

print('First word:', first)
print('Second word:', second)
print('\n')

TRENDING NEWS