CGG

-1

votes
2

answer
23

views

Replacing letters for values and adding them up [duplicate]

This question already has an answer here: How to test multiple variables against a value? 19 answers I am trying to replace different letters of the alphabet for a value: vowels are 1; "b", "g", "r" or "x" are 3 and the rest of the alphabet equals 5 (this is each character). I've tried to use conv...
CGG
2

votes
6

answer
45

views

How do I separate the numbers from an input in order to add them?

I am trying to have the user input a series of numbers (separated by commas) to receive the total of them. I have tried (with no luck): values = input("Input some comma seprated numbers: ") numbersSum = sum(values) print ("sum of list element is : ", numbersSum) values = input("Input some comma sep...
CGG