Jump to content

Truman

Members
  • Posts

    109
  • Joined

  • Last visited

1 Follower

About Truman

  • Birthday 06/12/1986

Profile Information

  • Location
    Belgrade, Serbia

Contact Methods

  • Skype
    milos bogdanovic 735

Recent Profile Visitors

11,632 profile views

Truman's Achievements

Member

Member (2/7)

3

Reputation

  1. I'm following a tutorial but unfortunately settings on my end are different then on 1:00:00 in the video. I cannot run code as it says "This server is not connected". There is manage connection option but i don't know what to do from there. Before this I installed mySQL and connected to local server from MySQL command line.
  2. Found it myself in the meantime - just click ENTER. It wasn't that hard.
  3. When I add element in "Search HTML" box that I want to find on page and it gives me several results. how can I see those that come after the first one? I don't see arrow or anything like that. For ex. when I add "id" for some page it gives me 9 results but I see highlighted only the first one. How to scroll to others?
  4. If anyone wants to know I had to install python again with pip, now it works fine.
  5. I intend to make lottery drawing program but first wanted to check the basic random module with a code: from random import * print(randint(1, 100)) Instead I receive a comment from cmd that contains output of some other file that I created None of my files is named random.py. I have no idea how is this possible.
  6. Interesting note, will keep that in my mind. Error message points to line 5 - break.
  7. Actually, else is lined up with for in official python tutorial and when I change it to what you suggested nothing changes...
  8. This is how my code actually looks like in notepad++. From some reason forum <> function doesn't paste code with the same indentation. Regarding the understanding of the code I understand mod operator but my miscomprehension was due to relation between for and else. Mixed things, now it's clearer.
  9. words = ['book', 'superficial', 'nostradamus'] for w in words: print(w, len(w)) for w in words[:]: if len(w) > 6: words.insert(0, w) words ['defenestrate', 'cat', 'window', 'defenestrate'] this is my code.
  10. for n in range(2, 10): for x in range(2, n): if n % x == 0: print(n, 'equals', x, '*', n//x) break else: print(n, 'is a prime number') There are two issues here: 1. TabError: Incosistent use of tabs and spaces in indentation 2. More importantly I don't understand the logic behind this code that leads to this output:
  11. You're correct but after changing it to square brackets I receive TypeError: list indices must be integer or slices, not tuple.
  12. It looks so, you can find it here: https://docs.python.org/3.6/tutorial/controlflow.html 4.2. for Statements
  13. Hi, I'm looking at this piece of code: words = ['cat', 'window', 'defenestrate'] for w in words[:]: if len(w) > 6: words.insert(0, w) words ['defenestrate', 'cat', 'window', 'defenestrate'] If I understand well it should make copy of the list and add 'defenestrate' into list but I receive a message "tuple object has no attribute instert". This code is a part of a tutorial I'm following and not sure why it doesn't work.
  14. Thanks, I closed php code before <!DOCTYPE...>' and now it works...
×
×
  • Create New...