Caleb Marshall

@launcherman08 (22)
I LOVE to program (That's why I have an account, duh) and I would like to be an astronaut and a software developer when I grow up.
Spammer
posted to Share by JordanDixon1

Cool!

WarhawkOS
posted to Share by Warhawk947

I get an error when I run the repl:

Unbeatable Tic Tac Toe
posted to Share by TrentBultsma

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

ATOM - a game based on the periodic table
posted to Share by SixBeeps

Question: If this is a game based on science, why do you lose protons if the Law of Conservation of Matter says otherwise? I am in 6th-grade science, so I may be wrong.

HELP ME
posted to Ask by WeiHe2

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

What's this?
posted to Ask by mkhoi

@mkhoi 🤔🤔🤔🤔🤔🤔

What's this?
posted to Ask by mkhoi

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

Reaction test
posted to Share by morganny16

This is cool!

LovingJovialOmnipage - Default Name Challenge
posted to Share by Vandesm14

Cool repl!!!

Gravity Simulator
posted to Share by MrEconomical
Gravity Simulator
posted to Share by MrEconomical

@MrEconomical How do you make it so that the object does not fall into a spot? Other than that, overall really nice.

Unblocker
posted to Share by JordanDixon1

@JordanDixon1 Why is shift not supported? I was trying to log into my repl account from a repl.

Repl Restore
posted to Ask by launcherman08

@PDanielY Thank you!

Reading Rewards Comment Creator
posted to Share by launcherman08

@IreoluwaRaufu Thank you!

Pokemon Battling Simulator
posted to Share by JimBob5

@JimBob5 Yes it did! Thanks!

Pokemon Battling Simulator
posted to Share by JimBob5

@JimBob5 Thank you! It now works.

Pokemon Battling Simulator
posted to Share by JimBob5

Nice job! One suggestion is to add an ending because my sister and I were playing, and she had zero pokemon. The game asked her to select a pokemon even though she had none.

Maze game
posted to Share by MerlinKnight

The game is throwing an error on line 319 with begin()

Colab
posted to Ask by xolyon

Sure. @xolyon

Dungeon Sweeper
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.

location.replace() Not Working
posted to Ask by launcherman08

@MatthewDoan1 Yes, and it did not work.

Lowchat: Fast and Secure chatting V2
posted to Share by Vandesm14

@Vandesm14 Thanks

location.replace() Not Working
posted to Ask by launcherman08

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

Office Crawler
posted to Share by Peanut123

NOICE!

Lowchat: Fast and Secure chatting V2
posted to Share by Vandesm14

Could you make it so that we can create rooms?

location.replace() Not Working
posted to Ask by launcherman08

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

website hacking game
posted to Share by MrEconomical

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

can't figure out line 27 and on
posted to Ask by ecarroll42

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

I need help with a script that doesn't seem to work!
posted to Ask by Bobo48

Can you add the repl pls?

Number of Even Digits
posted to Ask by AlvinJohn1

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

How to Solve the Problem

  1. Define function
#Defines function
def count_digits(num):
  1. 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:
  1. 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
  1. 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.") 
  1. 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.