Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for rickymak

def info(object, spacing=10, collapse=1): """print methods and doc strings. Take module, class, list, dictionary, or string.""" methodList = [method for method in dir(object) if callable(getattr(object, method))] processFunc = collapse and (lambda s: " ".join(s.split())) or (lambda s: s) print [B][U]"\n".join(["%s %s" %[/U][/B] (method.1just(spacing), processFunc(str(getattr(object, method).__doc__))) for method in methodList]) if …

Member Avatar for d5e5
0
717
Member Avatar for rickymak

Why is it that in this statement "c = '\t'" is not "c == '\t'" (an additional equal sign). I read an explanation that it is because \t is a visual representation of the tab character. Isn't \n and ' ' also visual representations of a newline and space character …

Member Avatar for mvmalderen
0
109
Member Avatar for rickymak

int c; c = getchar(); while ((c = getchar()) != EOF) putchar(c); c = getchar(); I know EOF means end of file. Basically, I believe this functions is instructed to keep inputing text from the keyboard until EOF becomes the subsequent input. However, I am not sure what EOF is …

Member Avatar for Aia
0
190
Member Avatar for rickymak

This program here is supposed to count the number of occurrences blanks, tabs and newlines within the respective text you type within the program. However, after I compile the program and run it on ubuntu's terminal, all I am able to do is punch in text, space, enter etc... endlessly …

Member Avatar for mvmalderen
0
218
Member Avatar for rickymak

Quick question: what does "if(c == '\n') mean in this context? Is it just using '\n' as a reference for a numeric value within ASCII? which in that case would be 10, so if 10 is entered, this is when nl increments up one? { int c, nl; nl = …

Member Avatar for rickymak
0
290
Member Avatar for rickymak

I have this error, " lvalue required as left operand of assignment," for line 10 where scanf command appears. I can't figure out a solution to it. [CODE]#include <stdio.h> int main() { int start; char delay; printf("We're close to blast off.\n"); printf("countdown initiated"); scanf=("%d", &start); do { printf("T minus %d …

Member Avatar for UncleLeroy
0
124
Member Avatar for rickymak

Hi, I don't understand the portions I put in bold in this function for converting Fahrenheit to Celsius. The texts are "FtoC." I am guessing "FtoC" is a variable; I really am confused about why "to" is in there. What does the paranthesis (float f) indicate? [CODE]#include <stdio.h> float [B]FtoC[/B](float …

Member Avatar for Narue
0
107