No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I have to strip anything that isn't a letter between a-z (lowercase only) out of a sentence. I wrote this [code=python]def breakPhrase(string): string=string.lower() for character in string: if ord(character) < 97 or ord(character) > 122: string=string.strip(character) return string[/code] and it works, but only if theres only one punctuation or non … |
|
I'm getting an unresolved symbols linking error with this code, the cpp files compile successfully separately, I just can't build the solution and run it. any ideas? header.h [code=c++] #include <iostream> #include <string> using std::string; using namespace std; class Double { private: double dub; char str[50]; public: Double(); Double(char s[50]); … |
|
This is my current coding, in my header file [code=c++] #ifndef _ADDRESSBOOK #define _ADDRESSBOOK const int MAXADDRESS = 25; struct PERSON { char fName[25]; char lname[25]; char Address[100]; }; class addressBook { private: PERSON people[10]; public: addressBook(); addressBook(char *fName, char*lname, char *add); addressBook(PERSON a); addressBook(PERSON init[], int count); bool addPerson(const … |
|
can someone show me some code to convert rankine temperature to kelvin? rankine is in the same scale as fahrenheit, but it starts at absolute zero. so 0R = -459.67F, heres is what I have convert to kelvin [code=python] def __init__(self, value=0): Fah=value-459.69 Cel=(Fah-32)*5/9.0 value=Cel-273.15 Temperature.__init__(self, value) [/code] convert back … |
|
Re:
hey everybody I'm taking a computer class right now and one of the projects I need to do is create a very simple pizza-ordering menu. At this pizzeria, there is only one kind of pizza you can order: regular (cheese) with no toppings. Your choices are what size of pizza, … |
|
Hi guys, I'm learning python right now, and I'm having a little trouble with one of my assignments. I have to write a program that will take a word and "encrypt" it. an example, if the letter is 'a' then it should get converted to 'b'. I have the code … |