# Capitalizing Participant Response

**URL:** <https://discourse.psychopy.org/t/capitalizing-participant-response/17079>\
**Category:** Coding\
**Tags:** screen\
**Created:** [October 7, 2020, 3:38pm UTC](https://discourse.psychopy.org/t/capitalizing-participant-response/17079 "2020-10-07T15:38:06Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![sal](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@sal](https://discourse.psychopy.org/u/sal)\
**Post date:** [October 7, 2020, 10:03pm UTC](https://discourse.psychopy.org/t/capitalizing-participant-response/17079/4 "2020-10-07T22:03:50Z")

</div>

Try putting it here:

```python
if keys[0] in allLetters:
            textFill +=upper(keys[0])

```

Or:

```python
if keys[0] in allLetters:
            textFill +=keys[0]
            textFill = upper(textFill)

```

Although, I’m not too terribly familiar with the way you’re adding letters. I use the `''.join()` method.

For the python to JS thing, there are a few functions that don’t translate well. One of the major issues is with `import` functions because they don’t exist in JS. Save yourself a TON of trouble later by avoiding those at all cost now. Check out [this thread](https://discourse.psychopy.org/t/variables-empty-in-online-script-looping-over-dictionaries/14137/3) and [this crib sheet](https://docs.google.com/document/d/13jp0QAqQeFlYSjeZS0fDInvgaDzBXjGQNe4VNKbbNHQ/edit#heading=h.niu1u15qj037) for help with translations! I’m honestly glad I mentioned the import function because fixing that later is not fun.

---

_[View the full topic](https://discourse.psychopy.org/t/capitalizing-participant-response/17079)._
