Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2014
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    please check my code and tell me where i am making code

    i am making a program and i want it to be 30 rooms
    please take a look and let me know if there is something i a missing


    fff=open("book.txt",'a')
    x=0
    while x<=30:
    a=str(input("your name"))
    b=int(input("phone number"))
    c=str(input("your address"))
    import time;

    localtime=time.asctime(time.localtime(time.time()))
    print("booking",localtime)
    x+=1
    fff.write(a+","+str(b)+","+c+"\n")

    y=input("do you want to book another room yes or no")
    if y=="yes":
    continue
    if y=="no":
    break;



    fff.close();

  2. #2
    New Coder
    Join Date
    Nov 2016
    Location
    South Africa, Cape Town
    Posts
    49
    Thanks
    1
    Thanked 1 Time in 1 Post
    Code:
    import time
    
    fff=open("book.txt",'a')
    x=0
             
    while x<=30:
        a=raw_input("your name")
        b=raw_input("phone number")
        c=raw_input("your address")
    
    
        localtime=time.asctime(time.localtime(time.time()))
        print("booking",localtime)
        x+=1
        fff.write(a+","+str(b)+","+c+"\n")
    
        y=raw_input("do you want to book another room yes or no")
        if y=="yes":
            continue
        if y=="no":
            break;
    
    fff.close();


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •