- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 7
- Posts with Upvotes
- 5
- Upvoting Members
- 4
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
**Bold Text Here**Hi there I'm just wondering what the best or a good table layout would be for a little project I'm trying to do at work. I work at a temp to perm agency where companies use us for the probationary peroid of employement and then hire the workers … | |
Re: This does something similar to what you want. Try to read each line and understand them they are pretty easy to follow. print "Enter 5 numbers: " numbers = [] for i in range(5): numbers.append(int(raw_input("Enter number " + str(i + 1) + ": "))) print "The lowest number is " … | |
Re: If you take humanChoice out of main then it will never know what the human variable is in main for the check: if (human == 'Q' || human == 'q') break; so it will never exit when you press Q or q. And if you take humanChoice out of printScore … | |
Re: 1. You haven't said what your question is. I can guess that you just want someone to take your source and fix it so that it does your circular shift on the numbers. But it would be nice to hear what you think is wrong first. 2. Is this supposed … | |
Re: I'm pretty sure you want to create a custom context processor. It will add all the key/values you create in it to the dictionary that is used to fill in the variables that you have in your templates. A quick search gives this example which looks pretty good http://bradmontgomery.blogspot.ca/2009/01/add-context-processor-for-your-django.html | |
Re: Should be like pyTony says call sound.play(rem_vocals(sound)) because your rem_vocals function is returning the new__song. But are you sure your error is not from import sound. I don't see any module that exists with that name unless you have made it yourself. | |
Re: You just have to manually increase i at the end of the loop. And for the for loop you don't have to have i = 0 above it, just say for i in range(len(s)): [CODE]s = raw_input("Enter a string: ") a, i = 0, 0 while i < len(str(s)): if … | |
Re: Your first problem is you didn't pass your variables row and column into your display_table() like display_table(row, column). Your next issue is in your loops but you will see that when you pass the variables to the function. Also the problem suggests using string formatting to position the text not … | |
Re: I think you have your ""'s backwards on your if statement and print statement I'll walk you through d4 for example so the program asks the user what die they want - lets say they type "d4" then the program randomly generates a value for the variable d4 you have … | |
Re: [CODE]#include <iostream> #include <vector> #include <string> using namespace std; void printVector( vector<string> v ) { for(unsigned int i = 0; i < v.size(); i++) { cout << v[i]; } cout << endl; return; } int main() { int nStrings=0; string str=""; vector<string> myVector; char cAlphabet[] = {'a','b','c','d','e','f', 'g','h','i','j','k','l','m','n','o','p', 'q','r','s','t','u','v','w','x','y','z'}; str=cAlphabet; … | |
Re: [CODE]#include <cstdlib> #include <iostream> using namespace std; // The function checkQuestion is being overloaded // Overloading a function means having the same function name // but multiple definitions with different parameter types exist // so here there is basically an int, string and bool version // of checkQuestion void checkQuestion(int … | |
Re: Ya when you use cin >> it leaves a '/n' in the buffer for some reason so you need to use cin.ignore() to get rid of that otherwise it will carry that over to your cin.getline() and will just use the '/n' making it do nothing like you say. BUT … | |
Re: Can you post a sample input file so I can take a look? Are the item numbers linked to the items names. So if you put them in a multi dimensional array you can just sort it using the item number, or does it need to be able to sort … | |
Re: man sorry to ask a question on your question forum but what does this do: [CODE] double zero_zero; *(a+0)[0] = zero_zero; double zero_one; *(a+0)[1] = zero_one; double zero_two; *(a+0)[2] = zero_two;[/CODE] question 1: what is *(a+0)[0] supposed to be? do you mean a[0][0]? question 2: why are you setting this … | |
Re: okie dokie I just did this program and I'll tell you a little bit about the code to get you started. I can't really give you the sudo code because then it would be ultra obvious and easy for you to copy lol. But if you can show some progress … | |
Re: Wow that is one crazy problem and and be probably interpreted a few different ways. The way I read it is 1) get 4 expense values from the user ( because they have 4 games a year) 2) get the average of the 4 expenses ( so add the for … | |
Re: [CODE]# include <iostream> # include <string> using namespace std; // Protype for the avg function: // Passing by reference mainAverage which is the average variable declared in // main the function can have a void return type and still get the average grade // back into the main function because … |