1)Create a list of the odd numbers between 1 and n (include 1 as well as n -- if it's odd-- in the list). Associate the list with the variable odds .

2)Given the list my_list containing integers, create a list consisting of all the even elements of my_list . Associate the new list with the variable new_list .

3)Create a dictionary that maps the first n counting numbers to their squares. Associate the dictionary with the variable squares .

I assume the question is:
Who is foolish enough to do my homework for me?

if "EMERGENCY" or "Help" or "!" in heading:
   pass
elif ("no idea" in body) or (not Code() in body):
   pass
commented: Like the only original poster in the thread :S +2

Epic Fail

Oh Willz.

if assignment.hard or self.lazy:
    submit_to_daniweb(assignment)
else:
    self.DoHomework(assignment)

Kind off help whit some clear messages.

>>> we_dot_do_homework_if_no_effort_is_shown = 2
>>> 1 % we_dot_do_homework_if_no_effort_is_shown
1
>>> 2 % we_dot_do_homework_if_no_effort_is_shown
0
>>> 3 % we_dot_do_homework_if_no_effort_is_shown
1
>>> 4 % we_dot_do_homework_if_no_effort_is_shown
0
>>> stupid = 3
>>> show_effort = 4
>>> if stupid % we_dot_do_homework_if_no_effort_is_shown == 1:
	print'Odd'
else:
	print 'even'

	
Odd
>>> if show_effort % we_dot_do_homework_if_no_effort_is_shown == 1:
	print'Odd'
else:
	print 'even'

	
even
>>>

Halo_123 next time do your homework and show us what you did so we CAN help you insead of DOING IT FOR YOU.

i think this sums it up: (comp im using doesnt have python, so its in plain text, lol)

#read the following and reflect on it before you post another
#thread like this please. It says somwhere on daniweb that you have
#to TRY first before a daniweb member will help you.

print "Please do your homework first halo, then ask us for help"

Please do your homework first halo, then ask us for help

i think this sums your problem up pretty good:

def Myfunc():
print "Stuff"
print "Halo_123, please do your homwork first, then ask us how."
Halo_123, please do your homwork first, then ask us how.

sry for the double post...just had to add [code] tags to it.

It is LEGAL to ask for starting point, or for PROBLEM in coding But it drives me bananas someone wants his/her homework done. Oh! Why did you go to college/School then?? :lol:

The first problem could be kind of easy:

n = 11
for odd_number in range(1, n+1, 2):
    print( odd_number )

"""
1
3
5
7
9
11
"""
new_list=[]
for i in my_list:
    if i%2==0:
        new_list.append(i)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.