@launcherman08 (13)

posted to Share by Warhawk947

First of all, sitechantment wasn't installed, so it keeps throwing me an error.

@mkhoi 🤔🤔🤔🤔🤔🤔

You typed gibberish into the console, so Python thinks it is code and tries to execute it, which results in an error.

posted to Share by TrentBultsma

Hey, nice job! Haven't been able to beat now!

posted to Share by morganny16

This is cool!

Cool repl!!!

posted to Share by AlexanderTarn

Nice job! Could you possibly use .lower in battle? I had a couple of times where I accidentally misspelled, and it did not attack.

posted to Ask by launcherman08

@MatthewDoan1 Yes, and it did not work.

@Vandesm14 Thanks

posted to Ask by launcherman08

@MatthewDoan1 I am trying to redirect the page to a different page.

NOICE!

Could you make it so that we can create rooms?

posted to Ask by launcherman08

@MatthewDoan1 Sorry Matthew, but when tested, the code did not work.

posted to Share by MrEconomical

I am very confused on level 2 (XD). This game is awesome!

posted to Ask by ecarroll42

Do you know how to code in HTML, CSS, and Javascript?

Can you add the repl pls?

posted to Ask by AlvinJohn1

**THIS IS HOW TO FIND HOW MANY VOWELS ARE IN A STRING**

- Define function

```
#Defines function
def count_digits(num):
```

- Then, you add this code to determine if the number is an actual number. (Int mean integer, str means string)

```
#Determines if the number is a number.
if type(num) == int:
```

- Then you this code to make
`arr`

, the variable that converts`num`

to a string. After that,`result`

is the number of vowels.

```
#Makes num a string
arr = str(num)
#Sets result to 0
result = 0
```

- After that, then you type
`for digit in arr`

, which means that you're setting a new variable called`digit`

, in`arr`

, the code will determine if`digit`

turned into a number divided by 2 equals 0, then the code determines it as even, so it adds one to`result`

. Then, after that loop is done, it will print > There are`result`

even digits in the number.

```
#Goes through the answer (arr)
for digit in arr:
if int(digit) % 2 == 0:
result += 1
print("There are", result,"even digits in the number.")
```

- Finally, you go outside of the variable and add this code, which will ask for a number. Then, it will convert the answer into a number. After that, it will run the function, with
`number`

as`num`

.

I hope this helped you! Here is all the code:

```
#Defines function
def count_digits(num):
#Determines if the number is a number.
if type(num) == int:
#Makes num a string
arr = str(num)
#Sets result to 0
result = 0
#Goes through the answer (arr)
for digit in arr:
if int(digit) % 2 == 0:
result += 1
print("There are", result,"even digits in the number.")
number = input("Enter a number: ")
number = int(number)
count_digits(number)
```

Also, here is the Stack Overflow question where I got the code.

That cookie looks delicious! :)

This is super cool!

posted to Ask by DragoniteDL

Just one question, what are all the ones for? (var1, var2, var3)

posted to Ask by launcherman08

@mat1 Cool. Thanks!

posted to Ask by launcherman08

@HarperframeInc Thank you! This was a really big help!

posted to Share by launcherman08

@katyadee Hi, the challenge is to make a repl, but to not name it. (a default-named repl) Then you code it to do what the name says. (More in the link https://repl.it/talk/ask/Default-name-challenge/14374)

posted to Share by launcherman08

@Stanlyhalo Hi, next time it happens, can you send me a screenshot? I just ran the game and it did not stop at that point.

posted to Share by launcherman08

@JustARatherRidi Just fixed it.

@Snowflake Thanks! All clear now

Cool!