I am working on the following problem:

Writing a program that calculates and prints a value according to the formula:
Q=formula
Input variable has values that are input to program in comma-separated sequence.  The output should be formula calculated from input in comma-separated sequence.

This is the code I have so far:

```import math
D=(input("Enter numbers separated by commas:" ))
D=D.split(',')
While i > 1
for each in set(list(D)):
C=50
H=30
#D=D.split(',')
Q=math.sqrt((2*C*each)/H)
print(Q,sep=',')``` Jan 8, 2019 in Python 166 views

## 1 answer to this question.

Try this:

```import math

c = 50

h = 30

value = []

print("Input Values")

items = [x for x in input().split(',')]

for d in items:

value.append(str(int(round(math.sqrt(2*c*float(d)/h)))))

print("The followings output are")

print(','.join(value))``` answered Jan 8, 2019 by
• 68,940 points

+1 vote

## I am trying to write a program in python for the occurrences of a character given the start and stop values of that string only using while

Here's the code: check = input("Enter the character: ...READ MORE

## How to sort Counter by value using python?

Use the Counter.most_common() method, it'll sort the items for you: >>> ...READ MORE

+1 vote

## How to run the Python program forever?

you can also do the old fashioned ...READ MORE

## Python using basicConfig method to log to console and file

I can't reproduce it on Python 3.3. ...READ MORE

+1 vote

## how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

## how do i use the enumerate function inside a list?

can you give an example using a ...READ MORE

## Lowercase in Python

You can simply the built-in function in ...READ MORE