756 Answered Questions for the topic Python

Python

05/16/18

List dependencies of Python wheel file

02/16/18

How do I code ∀a∈A∃b∈B∃c∈C(3a2+b2=c+10) as a nested quantifier in Python?

# For all a in A, there exists b in B, there exists c in C such that 3*a / 2 + b*b = c + 10def p3(A, B, C): for a in A: for b in B: for c in C: statement = True if 3*a / 2 + b*b == c + 10:... more
Python

02/13/18

does this site answer python programming questions

looking for application developer that has advanced Mac OS X IDLE python shell scripting skills that can develop a python application that can open six files, read fields from six files and do... more
Python

11/11/17

I need help with python program. I don't understand where to start from

Design a class called ItemToPurchase.This class has the following attributes: item_name, item_price, and item_quanityThe ItemToPurchase class should have methods to return the current values of... more
Python Blender

10/07/17

how do i make a python text with a and gate and or gate combined for blender

.............................
Python Programming

09/23/17

Python spacing question

So this is my code, but when a name is input it doesn't have the spacing between the words, for example "M. Ghandi" comes out as "M.Ghandi" instead, how do I get the separation between the... more
Python Programming

09/23/17

Python decimal question

So this is my code right now: s = input("Input a float: ") in_input = float ( s ) '{:{width}.{prec}f}'.format( in_input, width=12, prec=2) '{0:10.2f}'.format ( in_input ) print (in_input) It works... more
Python Programming

09/22/17

Python translating question

So I need to create a program that can translate sentences to Pig Latin. If the word begins with a vowel, the I need to append “way” to the end of the word. If the word begins with a consonant,... more
Python Math Programming

09/18/17

Using Python to find change

So I have 10 quarters, 10 dimes, 10 nickels, and 10 pennies. I need to create a code that will determine if that money can purchase an object at a certain price (the price is the input of the code)... more
Python Math

09/16/17

Python coding question

My current code is shown below, and I need to get it so that the code will print all the factors of that number, one in a line. But right now I'm not getting an output from the code. n_str =... more

what is the problem with this code

def new password=str(input("Please enter your new password ")) password2=str(input("Please re-enter your password")) if password==password2: print ("Password completed") if password2:... more
Python

04/27/17

what is the cost of 100 batches of each candy using ingredients from supplier k?

A company makes three chocolate candies: cherry, almond, and raisin. Matrix A gives the amount of ingredients in one batch. Matrix B gives the costs of ingredients from suppliers J and K. using the... more
Python

04/27/17

how many teachers and TA's the program should hire to minimize costs. what is the minimum cost?

 Northwestern is looking to hire teachers and TA’s to fill its staffing needs for its summer program at minimum cost. The average monthly salary of a teacher is $2400 and the average monthly salary... more
Python

04/27/17

how many pairs of sneakers will have to be sold for the company to break even on this new line of shoes?

 Reebok is designing a new type of Crossfit shoe, the Nano X.  The fixed cost for the production will be $24,000.  The variable cost will be $36 per pair of shoes.  The shoes will sell for $107 for... more
Python

04/27/17

find the probability it came from box A if it is a winner

 A fast-food company is conducting a sweepstakes, and ships two boxes of game pieces to a particular franchise. Box A has 4% of its contents being winners, while 5% of the contents of box B are... more
Python

03/03/17

Python and Scratch are both programming languages in which you should be mindful of syntax errors.

Python and Scratch are both programming languages in which you should be mindful of syntax errors.  
Python

02/16/17

Write programs with loops that compute a. The sum of all even numbers between 2 and 100 (inclusi

Write programs with loops that compute a. The sum of all even numbers between 2 and 100 (inclusive). b. The sum of all squares between 1 and 100 (inclusive). c. All powers of 2 from 20 up to 220.... more

02/01/17

while loop to display the integers from 0 to 200 in increments of 25, all on one line separated by a single space.

i need to program a while loop to display the integers from 0 to 200 in increments of 25, all on one line separated by a single space.Then use a for loop and the range operator to display the same... more

basic python multiple question

This program should prompt the user to enter an exact multiple of 19 that is greater than 200. Then, the program should analyze the input and display a response to each of the four possible results... more

01/22/17

basic python math problem

Peggy listed a real estate property for a commission rate of 5.0%. Peggy’s brokerage will get half of the commission and Peggy’s share will be half of that. The property sells when reduced by 20%.... more

12/07/16

A Probability Question (Squash Game)

A squash game consists of rallies problem.  (Question):-   Notes:- P(A wins) = ra / (ra+rb), wins a point in a rally 0 < ra ≤ 100   Suppose player (A) has ability ra = 60 and... more
Python

11/11/16

need help solving this python coding:

keep getting this code incorrect: Write the definition of a class ContestResult containing:An instance variable winner of type String, initialized to the empty String.An instance variable... more
Python

11/11/16

python help

need help writing this code in python please: I keep getting it incorrect.   Write the definition of a class Counter containing:An instance variable named counter of type intAn instance variable... more

05/23/16

Complexity classes in Python

In python for complexity classes,   If we return a tuple like (v,k+1), is that return statement a complexity class of O(N) because of tuple containment?    The function is like this:   def... more
Python

02/26/16

I want to kmow the code for the law of sines to use in python

I need to find angles of a triangle and i need to use the law of sines, however i keep getting a syntax error, anyone know the code for the law of sines on python?

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.