You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
The banners on the left side and below do not show for registered users!
If you have any problems with the registration process or your account login, please contact contact us.
Campus ForumTHIS SPACE OPEN FOR ADVERTISEMENT. YOU SHOULD BE ADVERTISING HERE! The Student Life
School events, activities, rate your prof, students helping each other..
I'm going tomorrow at 10:30 for breakfast, if anyone cares to join
I'll join you tomorrow
6 hours straight of lectures/tutorials with no breaks in between starting at 11:30...
I'm going to starve to death unless I consume a shtload of food beforehand
anybody see the mercedes benz cls amg parked near the bus loop around blusson hall? It's always parked in the 2 hrs or 3 hrs limit parking area. Funny how the owner can't afford to pay parking pass lol
Maybe the owner couldn't get a pass through the lottery system
RS.net, where our google ads make absolutely no sense!
Join Date: Mar 2011
Location: Richmond
Posts: 916
Thanked 693 Times in 227 Posts
Failed 68 Times in 25 Posts
Quote:
Originally Posted by MuffinMaster
I'll join you tomorrow
6 hours straight of lectures/tutorials with no breaks in between starting at 11:30...
I'm going to starve to death unless I consume a shtload of food beforehand
has anyone bought the supplemental book for econ 103? its fuckin expensiveee. i wnt more practise with problems but i have no clue if they have practise problems with answers inside! help!
Anyone park at UniverCity for slightly over 2 hours (15-20minutes) consistently without getting a parking ticket? I have class at 230-430, but it takes me 5-7 minutes to walk to class.
Maybe the owner couldn't get a pass through the lottery system
highly unlikely imo. I got my parking permit the first time I tried for the lottery system which is last Fall. Then I tried the lottery system again in summer 2012 for fall 2012 just to experiment, I won the lottery but I didn't buy the permit. Then again last semester, I entered the lottery once again and won the lottery lmao, and I got the permit this time. So yea I think it's really easy to win the lottery
Anyone park at UniverCity for slightly over 2 hours (15-20minutes) consistently without getting a parking ticket? I have class at 230-430, but it takes me 5-7 minutes to walk to class.
Its fine, you would be outraged at how i park there. For almost an entire term straight I parked and placed old tickets on the dash until i got a ticket one day. Now i just pay for an hour or two and park for like 3-4 hours.
I. QUESTION 1: The secret code – String and numeric: functions and methods
General description
Your program will ask the user (who is a student) his/her name, age and one
course he is registered to.
Then it will do calculations and show a secret code as detailed below.
The whole program only asks data to the user, calculates and prints results
once. To test many cases (for different user names, courses, etc) the user
needs to run the program several times.
More detailed description of the program to be implemented
a. Print a welcome message
b. Ask the user:
i. his/her name. Assume the user will type the name by typing first the
first name, then a space and then the last name. Assume the last
name has at least 2 letters.
ii. age. Assume the user types an integer number greater than 0
iii. a course the student is registered in. Courses codes are formed of
two parts separated by a dash (-). Both parts contain at least a
character. The first part will contain only letters. The second part
may contain all numbers or all letters.
For example, courses may be: CMPT-120, MATH-CALC, ART-1, X-1234
c. Create the secret code (as indicated below)
d. Print the secret code to the user.
Secret code
The secret code will be formed:
a.The first letter of the first name, followed by
b.the first two letters of the last name, followed by
c.the last letter of the last name
d.as many stars (*) as the integer part of the square root of the age,
followed by
e.the last letter of the course first part, followed by
f. (if the second part of the course is a number) the last course digit Page 2 of 3
g.if the length of the code (formed until and including part f) is an even
number then the code will additionally be followed by the letter “e”
Requirements
1. Follow exactly the problem description. Get inspired in the sample runs (you
can change the dialog with the user as long as the same information is
shown).
2. Include comments in your code, including the name/s of the author/s of the
program at the top.
3. You do not have to define functions to organize this program, but you may.
4. Include at least one intermediate printing showing intermediate results to
best follow and debug the program (see the TRACE message in the sample run)
5. Hint: Check the string methods (in the python library). In particular check
the methods find() and isdigit()
So here's where I'm stuck,
the user will enter their name as
Will Smith
or
Jackie Chan
I need a way of picking out the the first letter of the first name, first two letters of the last name, last letter of the last name. All the names will be in the same format (First Last) and it has to work with last names of just 2 characters.
Confused on how to get this to work. I set it up with the inputted name = to a variable. Then used the variable as a range and searched for the space but that didn't work.
Also I'm stuck on the course part but that's part of the above problem, I think if i can figure out the above I can figure out the rest
anybody uses Shaw for their TV here? More than half of my channels are unavailable including showcase, discovery channel... It says I need to obtain a digital box.
Anyone park at UniverCity for slightly over 2 hours (15-20minutes) consistently without getting a parking ticket? I have class at 230-430, but it takes me 5-7 minutes to walk to class.
off topic, why is your profile picture so much similiar to the one at 0.06 in this video.
My AFC gave me an ABS CEL code of LOL while at WOT!
Join Date: Sep 2011
Location: RevScene.net
Posts: 1,889
Thanked 1,284 Times in 420 Posts
Failed 238 Times in 105 Posts
Quote:
Originally Posted by yellowpower
Its fine, you would be outraged at how i park there. For almost an entire term straight I parked and placed old tickets on the dash until i got a ticket one day. Now i just pay for an hour or two and park for like 3-4 hours.
I think he's talking about the ones near the UniverCity apartments...where it's free 2 hour street parking.
anybody see the mercedes benz cls amg parked near the bus loop around blusson hall? It's always parked in the 2 hrs or 3 hrs limit parking area. Funny how the owner can't afford to pay parking pass lol
That was my car. My convo mall parking spot was too far from blusson tutorial so I decided to park there.
__________________ There's a phallic symbol infront of my car
Quote:
MG1: in fact, a new term needs to make its way into the American dictionary. Trump............ he's such a "Trump" = ultimate insult. Like, "yray, you're such a trump."
bcrdukes yray fucked bcrdukes up the nose
dapperfied yraisis
dapperfied yray so waisis
FastAnna you literally talk out your ass
FastAnna i really cant
FastAnna yray i cant stand you
It's been a while, and I think python doesn't recognize whitespaces like traditional programs so you really can't use " " as a conditional.
What I would try using is the string constants like this:
for i in range(0, len(name) ):
if name.substring(i).whitespace():
print "space found!"
again, it's been a long time so it is a shot in the dark, becareful of using this though, because it also detects EOLs and tabs
I don't think you read the question correctly.
He's asking for the first letter of the first name and the first letters of the last name and the last letter of the last name.
Ex.
Will Smith would turn into "WSMH" from Will Smith
I was thinking of something like
name=raw_input("What is your name?")
name[0]+[name[-1] for the first letter of the first name and the last letter of the last name but I can't figure out the first two letters of the last name.
RS.net, where our google ads make absolutely no sense!
Join Date: Mar 2011
Location: Richmond
Posts: 916
Thanked 693 Times in 227 Posts
Failed 68 Times in 25 Posts
Quote:
Originally Posted by CRS
I don't think you read the question correctly.
He's asking for the first letter of the first name and the first letters of the last name and the last letter of the last name.
Ex.
Will Smith would turn into "WSMH" from Will Smith
I was thinking of something like
name=raw_input("What is your name?")
name[0]+[name[-1] for the first letter of the first name and the last letter of the last name but I can't figure out the first two letters of the last name.
Quote:
Then used the variable as a range and searched for the space but that didn't work.
He's asking for a way that he could detect a whitespace. He's using a for loop to process the string.