User Profile

Collapse

Profile Sidebar

Collapse
matusiek191
matusiek191
Last Activity: Aug 21 '15, 06:05 PM
Joined: Jul 25 '15
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How to access second and another value of a key?

    Code:
    dicc ={ "key" : ["value1", "value2"], ...}
    How can I access the second value?

    I can do :
    Code:
    for i in dicc:
        print(dicc[i])
    
    or
    
    for i in dicc:
        print(dicc.get(i))
    but it will print me both values and i need to access only first one or second one,third etc...cant use slices cooz of the error.
    See more | Go to post

  • matusiek191
    replied to Guess my number problem
    Thanks, I using Python 3.4.3 but thank you. It was so easy that I feel stupid right now
    See more | Go to post

    Leave a comment:


  • matusiek191
    replied to Guess my number problem
    After changing " tries += 1 guess = int(input("Gues s again: "))" from the beggining to the end of the loop it works ok but after you guess the number cmd doesnt want to print "print("Goo d you got it and it only tooked you ", tries, " tries!")". Maybe this code is a mess but im new in this. Just need some more experience. Thanks for help.
    Code:
    import random
    
    print("\t\t\tWelcome
    ...
    See more | Go to post

    Leave a comment:


  • matusiek191
    started a topic Guess my number problem

    Guess my number problem

    I have a problem. For me all is correct but when im trying to have a first guess cmd dont print "print("Lower.. .")" and neither "print("Higher. ..")" statement. after first try everything works good. Help me just to find a problem because i cant see anything. Thank You

    Here is my source code:

    Code:
    import random
    
    print("\t\t\tWelcome to guess my number game!!!")
    ...
    See more | Go to post
No activity results to display
Show More
Working...