Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Newly written .txt file not printing
Post: RE: Newly written .txt file not printing
(Oct-20-2017, 04:46 AM)gruntfutuk Wrote: When you open a file your cursor position is at the beginning of the file so you can read from that position. When you write to a file the cursor position is... |
|
Crackity |
Homework |
11 |
6,101 |
Oct-20-2017, 04:55 AM |
|
|
Thread: Newly written .txt file not printing
Post: RE: Newly written .txt file not printing
(Oct-16-2017, 11:21 AM)gruntfutuk Wrote: Your first print does not work because your position in the file is already past the content you wrote.
You need a text_file.seek(0) before the print.
Of co... |
|
Crackity |
Homework |
11 |
6,101 |
Oct-20-2017, 04:19 AM |
|
|
Thread: Newly written .txt file not printing
Post: RE: Newly written .txt file not printing
You are correct. That error message doesn't correspond with the actual example I posted. I was merely trying to show the error code I got when I tried to place the print(text_file.read()) after the fi... |
|
Crackity |
Homework |
11 |
6,101 |
Oct-16-2017, 10:09 AM |
|
|
Thread: Newly written .txt file not printing
Post: Newly written .txt file not printing
Hello all,
Continuing my self study I just created a simple program which was to "write" to a new text file. The lesson is demonstrating a few different ways to write the same thing to the same file.... |
|
Crackity |
Homework |
11 |
6,101 |
Oct-16-2017, 06:23 AM |
|
|
Thread: [split] Coin Flip Program
Post: RE: [split] Coin Flip Program
(Sep-24-2017, 09:42 AM)buran Wrote: it IS looping, but you never change the value of toss in the body of the loop
I don't know why my brain tries so hard to make things harder than they need to be. ... |
|
Crackity |
General Coding Help |
5 |
4,888 |
Sep-25-2017, 03:48 AM |
|
|
Thread: [split] Coin Flip Program
Post: RE: [split] Coin Flip Program
Initially I was concerned about adding duplicate issues and flooding the forum with unneccessary info. After posting it I realized that seemed wrong and was in the process of clarifying on the chat ro... |
|
Crackity |
General Coding Help |
5 |
4,888 |
Sep-25-2017, 02:33 AM |
|
|
Thread: [split] Coin Flip Program
Post: RE: [split] Coin Flip Program
Wow! Hijacking sounds harsh. I wasn't sure and in fact I was just on the chat link to ask if it was better to start a new thread instead of adding my issue to an existing one. Now I know, so thanks.
... |
|
Crackity |
General Coding Help |
5 |
4,888 |
Sep-24-2017, 09:33 AM |
|
|
Thread: [split] Coin Flip Program
Post: [split] Coin Flip Program
Hello all,
I don't know if I should be adding my issue to this thread or starting a new one. I too am having trouble with my coin flip/toss game but my issue is a little different.
I was asked to crea... |
|
Crackity |
General Coding Help |
5 |
4,888 |
Sep-24-2017, 09:09 AM |
|
|
Thread: tip calculator not displaying proper dollar format
Post: RE: tip calculator not displaying proper dollar fo...
Good to know! Thank you so much!! |
|
Crackity |
Homework |
15 |
8,978 |
Sep-04-2017, 09:42 AM |
|
|
Thread: tip calculator not displaying proper dollar format
Post: RE: tip calculator not displaying proper dollar fo...
(Sep-01-2017, 02:31 PM)hbknjr Wrote: (Aug-30-2017, 08:59 AM)Crackity Wrote: I was wondering though if there is a certain situation[s] where one option is preferred over the other?"{}".format(arg) ... |
|
Crackity |
Homework |
15 |
8,978 |
Sep-04-2017, 07:00 AM |
|
|
Thread: tip calculator not displaying proper dollar format
Post: RE: tip calculator not displaying proper dollar fo...
(Aug-30-2017, 01:43 PM)syogun Wrote: Thanks for your post and answers from others. I am new to Python too and teaching myself. I learn basics of Python on Udacity. Could you tell me the name of the ... |
|
Crackity |
Homework |
15 |
8,978 |
Sep-01-2017, 02:20 PM |
|
|
Thread: tip calculator not displaying proper dollar format
Post: RE: tip calculator not displaying proper dollar fo...
(Aug-30-2017, 08:36 AM)hbknjr Wrote: Use:
print('To tip 20% the amount is: $ {:.2f}'.format(tip20))Another way is to use [url=https://docs.python.org/3/library/functions.html#round]round[/url].
pri... |
|
Crackity |
Homework |
15 |
8,978 |
Aug-30-2017, 08:59 AM |
|
|
Thread: tip calculator not displaying proper dollar format
Post: tip calculator not displaying proper dollar format
Howdy y'all, **smile**
I am working from a self-teach book and at the end of chapter 2 I have been given the challenge of creating a tip calculator. It actually says: "Write a tipper program where ... |
|
Crackity |
Homework |
15 |
8,978 |
Aug-30-2017, 08:26 AM |
|
|
Thread: indents disappearing from output after previewing post
Post: RE: indents disappearing from output after preview...
For the record, this is happening to me with the advanced reply. The only time I used quick reply was to add the P.S. to my previous message. **sad** |
|
Crackity |
Board |
14 |
8,408 |
Jul-25-2017, 08:27 AM |
|
|
Thread: indents disappearing from output after previewing post
Post: RE: indents disappearing from output after preview...
(Jul-20-2017, 12:53 PM)sparkz_alot Wrote: A couple of questions to help clarify.
1) Does this happen every time?
I've only just recenly noticed it, but yes it seems to do it for me every time.
2)... |
|
Crackity |
Board |
14 |
8,408 |
Jul-24-2017, 09:27 AM |
|
|
Thread: indents disappearing from output after previewing post
Post: indents disappearing from output after previewing ...
Hello,
I noticed this issue yesterday during another post and a moderator suggested I post this here to let someone know.
I was having trouble with getting my output to match my example in my book. ... |
|
Crackity |
Board |
14 |
8,408 |
Jul-20-2017, 11:45 AM |
|
|
Thread: sorted list not displaying
Post: RE: sorted list not displaying
That makes sense to me except that I have the \t in my code and yet the output is not indented as in the book's example...
Ok! Now I'm really confused. The above example is exactly what I got when I ... |
|
Crackity |
Homework |
6 |
5,129 |
Jul-18-2017, 11:54 AM |
|
|
Thread: sorted list not displaying
Post: RE: sorted list not displaying
That was it!! Thank you!
That was something I actually considered, but didn't try it... so, FAIL! **smile**
Here is the code with your suggested change:
def copy_sort(array):
copy = array[:]
... |
|
Crackity |
Homework |
6 |
5,129 |
Jul-17-2017, 10:09 PM |
|
|
Thread: sorted list not displaying
Post: sorted list not displaying
Hello all,
Sorry to bother you with yet another noob mystery but again, I find myself stumped. And I'd like to start by saying that I spent a solid hour or more trying to resolve this myself before c... |
|
Crackity |
Homework |
6 |
5,129 |
Jul-17-2017, 02:15 PM |
|
|
Thread: adding to code but still getting same output
Post: RE: adding to code but still getting same output
Hey Buran,
Thanks again for the help I appreciate it! Per your suggestion I am going to add the info you mentioned in our PM as a reference in case there is someone out there experiencing the same p... |
|
Crackity |
Homework |
7 |
4,650 |
Jul-12-2017, 12:08 PM |