User Profile

Collapse

Profile Sidebar

Collapse
lolipoli
lolipoli
Last Activity: May 11 '17, 05:48 AM
Joined: May 5 '17
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • lolipoli
    started a topic How does this code works?

    How does this code works?

    Hi , I am beginner at python and programming. I have been doing some exercises about counting average from txt file.

    txt file data is like this.

    1 : 4.25
    2 : 3.97
    3 : 1.45
    4 : 2.33


    python code is like this.

    name = []

    for line in open("fileData. txt").readlines ():
    name.append(lin e.strip().split (':')[1])

    name = map(float,name)
    ...
    See more | Go to post
    Last edited by lolipoli; May 8 '17, 10:35 AM. Reason: typo

  • lolipoli
    started a topic write array into txt python

    write array into txt python

    hello , i am waay new to python and programming.I'm trying to write program that stores username and password in txt but I don't seem to get what my problem is.

    userName=str(ra w_input ("Username :"))
    passWord=str(ra w_input("passwo rd : "))

    stuData={}


    stuData[userName ]=[passWord]
    print stuData

    f=open("student .txt","a")
    ...
    See more | Go to post
No activity results to display
Show More
Working...