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
~3K People Reached
Favorite Forums
Favorite Tags
c x 7
c++ x 1
Member Avatar for peste19

I am reviewing material i have covered in c and i wrote up some notes and i am getting an error, i was hoping if someone could help me with this #include <stdio.h> #include <stdlib.h> #include <string.h> struct node{ int data; struct node *next; }; void addtobegining(int); void traverse(); struct …

Member Avatar for wahidbashacse
0
120
Member Avatar for peste19

I made a function which will look up ages in dictionary and give out there name my dictionary si for example {george:16,amber:19} i made this [CODE] search_age = raw_input("Provide age") for age in list.values(): if age == search_age: name = list[age] print name[/CODE] but i know how to compare and …

Member Avatar for woooee
0
96
Member Avatar for peste19

I am trying to write my dictionary to a csv and i am getting errors, was wondering if someone could tell me what i am doing wrong this is my function [CODE] n = open(file.csv,"w") for item in my_dict.items(): f.write(item) f.close() [/CODE] my my_dict is for example {john ['25']} when …

Member Avatar for woooee
0
169
Member Avatar for peste19

I have a list for example list = ['a','b','c','d'] and i give and i want to give the letters in the list numeric value for example a=2,b=1,c=4,d=3 i want to display the list like this list = ['a','b','c','d'] but than i wanted to do a sum(list) and get a value …

Member Avatar for snippsat
0
121
Member Avatar for peste19

[CODE] for elem in sentence: .setdefault(elem, 0) repeat[elem] += 1 print sorted([ (freq,elem) for elem, freq in repeat.items()],reverse=True)[:3] print repeat [/CODE] i have this loop which analyses the elements in the loop and then prints by frequency, i wanted to print by frequency and alphabetically. example [(5,apple),(5,orange)]

Member Avatar for woooee
0
1K
Member Avatar for peste19

i am beginning to learn python so please be easy on me, i am trying to create a function that will accept user input and store it in a list, separating words and ignoring punctuation example: input = i.am/lost stores in list as "[i],[am][lost]" this is what i got so …

Member Avatar for TrustyTony
0
176
Member Avatar for peste19

I am trying to create a python program but i have a question about a certain part of the loop for example i have [CODE] question = input("press 1 or 2") if statement == 1: print "somthing" elif statement == 2: print "abc" [/CODE] ok my question now is for …

Member Avatar for nalawar
0
79
Member Avatar for peste19

[CODE] #include <iomanip> #include <iostream> #include <fstream> #include <string> using namespace std; int main () { int i,count(0),n; char strg1[50],strg2[2]; char *ptr1(strg1), *ptr2(strg2); cout << "Please input the string" << endl; cin >> strg1; cout << "Please input the character" << endl; cin>> strg2; while ((ptr1=strstr(ptr1,ptr2)) != NULL) { count++; …

Member Avatar for NathanOliver
0
1K