TRENDING NEWS

POPULAR NEWS

Help With Python Coding

Where can I ask for help on my Python code?

You could ask on the website called stackoverflow. states “It hosts questions in numerous programming languages, platforms, and services, and the top ones among them are JavaScript, Java, C#, PHP, Android,jQuery, python, and HTML. Its up-vote system helps people get quick answers after posting a query, and the stringent moderation ensures people getstraightforward answers or mention of places (links) to find them on the Internet.Source: hongkait Resources and Information.

Help with Python code?

Create a function called flatten that takes a single list and concatenates all the sublists that are part of it into a single list.

For instance, it should turn

[[1, 2, 3], [4, 5, 6]]

into

[1, 2, 3, 4, 5, 6]


10 points to Best Answer

Thanks.

P.S. This is for Python 2. It should also print the answer.

Help with python coding?

i have some code written but im using this thing called codelab and it wont accept it or give me any guidance as to what to do, can someone help? the questions are

1.Assume the availability of a function is_prime . Assume a variable n has been associated with positive integer. Write the statements needed to compute the sum of the first n prime numbers. The sum should be associated with the variable total .

2. Given the strings s1 and s2 that are of the same length, create a new string consisting of the last character of s1 followed by the last character of s2 , followed by the second to last character of s1 , followed by the second to last character of s2 , and so on (in other words the new string should consist of alternating characters of the reverse of s1 and s2 ). For example, if s1 contained hello" and s2 contained "world" , then the new string should contain "odlllreohw" . Assign the new string to the variable s3 .

3.Assign True to the variable has_dups if the string s1 has any duplicate character (that is if any character appears more than once) and False otherwise

Hangman Game Python 3 Coding Help!!?

Hi, I have an assignment in which I must create a hangman game using python 3. I am having trouble with certain parts of it. The assignment tells us we MUST use certain def functions such as askForInput(word, guessed, pic), main(), getWordList(minLength, maxLength), selectWord(minLength, maxLength), and a few more. I am having trouble with the following: askForInput, getWordList, and selectWord. I am not an experienced coder, and this stuff is really annoying me. If somebody out there could provide me with hints and parts of code that would be greatly appreciated! I have attached a photo that shows the above stated functions and what each function must do. Please refer to it. Thank You

Need help with a Python coding question:?

Write a function, named Q4, that takes a strictly positive int input, N, and return a tuple, (p,q), such that N = pq with p,q > 1, If no such (p,q) exist then return the keyword None.

Python coding assignment... help?

the instructions are

Write a program to prompt for a score between 0.0 and 1.0. If the score is out of range, print an error. If the score is between 0.0 and 1.0, print a grade using the following table:
Score Grade
>= 0.9 A
>= 0.8 B
>= 0.7 C
>= 0.6 D
< 0.6 F
If the user enters a value out of range, print a suitable error message and exit. For the test, enter a score of 0.85.

my code is:

x = 0.85
if x >= 0.9:
print 'A'
elif x >= 0.8:
print 'B'
elif x >= 0.7:
print 'C'
elif x >= 0.6:
print 'D'
else:
print 'F'

I get the desired output but when i run the code it says "you must prompt the score by using raw_input" and i have no idea how to fix it

Help with a python code please?

I'm trying to write a code for ordering pizzas, it's just a simple one with only 1 type of pizza (only worried about size of it). This is what i have so far, but i keep getting a syntax error on line 8. Any idea what it is and how to fix it? Here's the code:

int(a) = 7.99
int (b) = 14.99
int (c) = 18.99
int (d) = 22.99

print ("Let me help you order pizza by Michael Edwards");
size = int(input ("What size would you like? \n a. small \n b. medium \n c. large \n d. extra-large"))
if size == "a"
print ("Okay, small, that is $7.99 each"):
if size == "b"
print ("Okay, medium, that is $14.99 each"):
if size == "c"
print ("Okay, large, that is $18.99 each"):
if size == "d"
print ("Okay, extra-large, that is $22.99 each"):
elif size != "a, b, c, d"
print ("Error!"):

int (pizzas) = input("How many pizzas would you like?");
if size == "a"
int(cost)= pizzas * a
print ("Your total is {}".format(cost)):
if size == "b"
int(cost)= pizzas * b
print ("Your total is {}".format(cost)):
if size == "c"
int(cost)= pizzas * c
print ("Your total is {}".format(cost)):
if size == "d"
int(cost)= pizzas * d
print ("Your total is {}".format(cost)):

TRENDING NEWS