756 Answered Questions for the topic Python

Python

01/29/20

Even Odd Generator Python

I have to make a program where you input a number and it prints whether the number is even or odd and it must display the number followed by the next 9 even or odd numbers. The program must use the... more
Python

01/29/20

Math Programming Multiplication Table

I need to write a program where the user can specify both the number and up to which multiple. For example, I want the first 15 multiples of 9..etc. I also have to use the is_integer() method to... more
Python

01/23/20

I need help with this python question

Assume a runner runs at a constant pace of 6.2 miles per hour. Use Python to do the following: Declare a variable named distance_in_km Calculate how many kilometers the runner will run in 30... more
Python Coding

01/22/20

Python Programming Logic Question

A cookie recipe calls for the following ingredients:• 1.5 cups of sugar• 1 cup of butter• 2.75 cups of flourThe recipe produces 48 cookies with this amount of ingredients. Write a programthat asks... more
Python

01/12/20

How do you open a file over the network at a specified URL?

I tried urllib and urllib.request but not able to get the answer
Python

01/12/20

What function could you use to create a complete copy of a nested dictionary (a dictionary that has dictionaries as values)?

I've tried many answers such as "dict" "copy" "deepcopy" but can't seem to find the answer for the copy of nested dictionaries
Python

12/27/19

Python: using a while loop to parse multiple pages

Using the URL inside the function at the bottom of the code, I want to parse all of the quotes that are listed in all of the pages. However, this code only returns the first page's quotes and gives... more

12/26/19

What are some approaches/algorithms to solve the problem of supply-demand-price?

Problem statement: transport some products from (A, B, C) to (D, E, F), each place has a specified amount of supply (from) and demand (to). Each route has multiple choices (multiple vendors) and... more
Python

12/13/19

write a program that parses the testProgram string and any other programs that has functions calling each other. The program needs to print out

write a program that parses the testProgram string and any other programs that has functions calling each other. The program needs to print out:  A Python Dictionary with key:value pairs where the... more
Python

12/09/19

Need help writing python code to look at 3 things from an excel data file.

I need help with writing some codes for my project using Python. This is a very intro level class as I am an english major but took this class as interested in biostats (micro is my minor). We are... more

10/11/19

How does one set about learning how to use a python3 module

I have recently started to learn python and i have fine understanding of the python 3 syntax. I wanted to start learning more about numpy ,scipy tenserflow. I have tried reading the documentation... more

How to write a and b as inclusive integers? (python3)

Write a program that takes three integers a, b, and k as command-line arguments writes the integers between a and b (both inclusive), but only k integers per row.I honestly have no idea where to... more
Python Revit

07/29/19

Does learning Python help in Revit Dynamo?

Python Bash Perl

07/29/19

Pcregrep vs Perl vs Python for bash scripting when needing advanced regex features?

I've lately been using `pcregrep` to do Perl-style group matching when doing my bash scripts.The problem with `pcregrep` is that it's not readily available on Linux machines in general.An... more
Python

07/21/19

Python class 11

1. 12+(3*4-6)/32.12*3%5+2*6//43. (2+3)*5//4+(4+6)/24.12+(3**4-6)//2
Python Udp Simulink

07/20/19

Reading data from Simulink into Python over UDP?

I want to send data from a Simulink model (running in real time) to a Python script (also running in real time. I am using Simulink's built-in "UDP Send" block, which works, but I don't know how to... more
Python Simulink

07/19/19

TCP/IP Message from Python to Simulink?

I have a Simulink block, accepting TCP/IP connections and reading the incoming data. The data has to be integers of type int32. Imagine we have a variable of any integer number in Python. We can... more

07/12/19

How to integrate without limits in SymPy?

I am given `p(x) = 2ax^2 - b` and asked to integrate it twice, but I'm not given limits. However, when I just use `integrate`, I'm not given a constant of integration, which is crucial to the next... more

07/12/19

How to write simple geometric shapes into numpy arrays?

I would like to generate a numpy array of 200x200 elements in size and put into it a circle centered into 100,100 coordinates, radius 80 and stroke width of 3 pixels. How to do this in python 2.7... more

07/12/19

load .mat file in simulink from python hdf5storage library?

I am trying to load/read some random data in simulink I created using the Python module `hdf5storage`. I created `.mat` file in Python (simulink supports version 7.3 only) using this code: #... more

07/12/19

Implicit differentiation with Python 3?

How can we derivate a implicit equation in Python 3? Example `x^2+y^2=25` differentiation is: `dy/dx=-x/y`, when try this: from sympy import * init_printing(use_unicode=True) x =... more

07/12/19

Python/matplotlib : plotting a 3d cube, a sphere and a vector?

I search how to plot something with less instruction as possible with matplotlib but I don't find any help for this in the documentation. I want to plot the following things: - a wireframe cube... more
Python Calculus

07/12/19

Python partial derivatives easy?

I'm interested in computing partial derivatives in Python. I've seen functions which compute derivatives for single variable functions, but not others. It would be great to find something that did... more
Python Geometry

07/12/19

Calculating the overlap distance of two 1D line segments?

Trying to build a function that will return the total overlapping distance between 2 line segments, denoted by start and end ints. Currently I have this: That I got off the internet... more

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.