ATC3's Profile User Rating: -----

Reputation: 1 Apprentice
Group:
Active Members
Active Posts:
54 (0.09 per day)
Joined:
04-October 11
Profile Views:
931
Last Active:
User is offline Mar 05 2012 02:11 PM
Currently:
Offline

Previous Fields

Country:
UZ
OS Preference:
Linux
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Mitsubishi
Dream Kudos:
0

Latest Visitors

Icon   ATC3 Working on C#

Posts I've Made

  1. In Topic: What is wrong with this code?

    Posted 3 Feb 2012

    Well after I fix that I still can't figure out the check part.
  2. In Topic: What is wrong with this code?

    Posted 3 Feb 2012

    Like this:

    import getpass
    def pass_entry():
    	p = getpass.getpass(prompt='What is your favorite color? ')
    	if p.lower() == 'blue':
        	print 'Right.  Off you go.'
    		return check = 1
    	else:
        	print 'Auuuuugh!'
    
    def check_valid(check):
    	if check == 1:
    		print "Hello, Alex"
    
    pass_entry()
    check_valid()
    

    Because now I get this error message:


    File "test.py", line 6
    print 'Right. Off you go.'
    ^
    Indentationerror: expected an indented block

    I have really forgotten python for some reason.
  3. In Topic: Comparing strings inside variables

    Posted 3 Feb 2012

    Good suggestion. I will use that.
  4. In Topic: Comparing strings inside variables

    Posted 2 Feb 2012

    I got the concept to work but this won't work in the program:
    def job_generator():
        import random
        first = ["Adan", "Alex", "Vladimir", "Alfredo", "Carlos", "Justin", "Martin", "Cory", "Jeff", "Reginaldo", "Valerio", "Joel"]
        third = ["Adan", "Alex", "Vladimir", "Alfredo", "Carlos", "Justin", "Martin", "Cory", "Jeff", "Reginaldo", "Valerio"]
        fifth = ["Adan", "Alex", "Cory", "Jeff", "Valerio", "Justin"]
        seventh = ["Adan", "Alex", "Vladimir", "Alfredo", "Carlos", "Justin", "Martin", "Cory", "Jeff", "Reginaldo", "Valerio"]
        ninth = ["Adan", "Cory" , "Martin", "Valerio", "Cory", "Jeff", "Vladimir"]
        randomNumber1 = random.randrange(0,len(first))
        randomNumber3 = random.randrange(0,len(third))
        randomNumber5 = random.randrange(0,len(fifth))
        randomNumber7 = random.randrange(0,len(seventh))
        randomNumber9 = random.randrange(0,len(ninth))
        job1 = first[randomNumber1] + " is assigned to Mic 1"
        job2 = third[randomNumber3] + " is assigned to Mic 2"
        job3 = fifth[randomNumber5] + " is assigned to Sound "
        job4 = seventh[randomNumber7] + " is assigned to Stage"
        job5 = ninth[randomNumber9] + " is assigned to Attendant"
        print "\t"
        print(job1)
        print "\t"
        if job1 == job2:
    		randomNumber3 = random.randrange(0,len(third))
    		job2 = third[randomNumber3] = " is assigned to Mic 2"
        print(job2)
        print "\t"
        print (job3)
        print "\t"
        print (job4)
        print "\t"
        print (job5)
     
    job_generator()
    
    
    
    
    
    
  5. In Topic: Comparing strings inside variables

    Posted 2 Feb 2012

    I have no idea why it was not working for me before. Thanks anyway.

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Full Name:
Alexander Thomas Cruz
Years Programming:
1
Programming Languages:
Python, C#, C++, Java, VBS, JScript

Contact Information

E-mail:
Private

Comments

Page 1 of 1
  1. Photo

    NotarySojac Icon

    13 Dec 2011 - 20:41
    You're certainly welcome friend =)
Page 1 of 1