–1 vote

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 4,053 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))```
• 69,210 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 find the value of a row in a csv file in python and print column and row of that value ?

Hello @Khanhh , Use panda to find the value of ...READ MORE

## how can i randomly select items from a list?

You can also use the random library's ...READ MORE

+1 vote

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

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

## Lowercase in Python

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