# GamingHow to conver code to an algorithm?

#### kevan

##### Imagination rules the world
OP
Member
Code:
``````import time

while True:
value = int(input("Anti-Bot Test: Enter a number under 5 (leave blank to quit): "))
if not value:
break
elif value < 5:
print ("Passed")
break
else:
print ("Failed")

if value:

dob = input("Date of Birth: ")
print ("Review the following information")
time.sleep(1)
print ("Your date of birth is: %s" % (dob))
y=['yes']
yn=str(input("Type yes to confirm information or no to revise it: "))
if yn in y:
print ("Thank you for registering")``````
I need it if they type no they go back to entering their username. Also if they type anything else except 'yes' or 'no' it tells them that is wrong and to type 'yes or 'no' again.
Thanks for the help so far guys
This is the code I have and I'm curious on how I would convert it back to an Algorithm? Also the question I have there in the quote. Any help with that please!

#### kirlac

##### Well-Known Member
Newcomer
Since an algorithm is just the step by step of what needs to happen you just read the code and write what each part is doing eg.
In a loop
Take in input to determine user is not a bot
Check if input is less than 5
etc.

As for the question, perhaps use some while loops eg.
create variable repeating set to true
while repeating
while answer is not yes or no
do yes scenario
set repeating to false
else set repeating to true
end loop
end loop

EDIT: Forgot to create repeating variable (initialized as true) and set it to false when doing the yes sceneario to prevent infinite loop.

Replies
13
Views
18K
Replies
123
Views
25K
Replies
49
Views
30K
Replies
80
Views
31K

1. 62K views

### Nintendo Switch firmware 18.0.0 has been released

It's the first Nintendo Switch firmware update of 2024. Made available as of today is system software version 18.0.0, marking a new milestone. According to the patch...
2. 23K views

### Atmosphere CFW for Switch updated to pre-release version 1.7.0, adds support for firmware 18.0.0

After a couple days of Nintendo releasing their 18.0.0 firmware update, @SciresM releases a brand new update to his Atmosphere NX custom firmware for the Nintendo...
3. 20K views

### Wii U and 3DS online services shutting down today, but Pretendo is here to save the day

Today, April 8th, 2024, at 4PM PT, marks the day in which Nintendo permanently ends support for both the 3DS and the Wii U online services, which include co-op play...
4. 16K views

### GBAtemp Exclusive Introducing tempBOT AI - your new virtual GBAtemp companion and aide (April Fools)

Hello, GBAtemp members! After a prolonged absence, I am delighted to announce my return and upgraded form to you today... Introducing tempBOT AI 🤖 As the embodiment...
5. 13K views

### Pokemon fangame hosting website "Relic Castle" taken down by The Pokemon Company

Yet another casualty goes down in the never-ending battle of copyright enforcement, and this time, it hit a big website which was the host for many fangames based and...
6. 13K views

### The first retro emulator hits Apple's App Store, but you should probably avoid it

With Apple having recently updated their guidelines for the App Store, iOS users have been left to speculate on specific wording and whether retro emulators as we...
7. 12K views

### MisterFPGA has been updated to include an official release for its Nintendo 64 core

The highly popular and accurate FPGA hardware, MisterFGPA, has received today a brand new update with a long-awaited feature, or rather, a new core for hardcore...
8. 12K views

### Delta emulator now available on the App Store for iOS

The time has finally come, and after many, many years (if not decades) of Apple users having to side load emulator apps into their iOS devices through unofficial...
9. 10K views

### "TMNT: The Hyperstone Heist" for the SEGA Genesis / Mega Drive gets a brand new DX romhack with new features

The romhacking community is always a source for new ways to play retro games, from completely new levels or stages, characters, quality of life improvements, to flat...
10. 9K views

### Anbernic announces RG35XX 2024 Edition retro handheld

Retro handheld manufacturer Anbernic is releasing a refreshed model of its RG35XX handheld line. This new model, named RG35XX 2024 Edition, features the same...
1. 225 replies

### Nintendo Switch firmware 18.0.0 has been released

It's the first Nintendo Switch firmware update of 2024. Made available as of today is system software version 18.0.0, marking a new milestone. According to the patch...
2. 179 replies

### Wii U and 3DS online services shutting down today, but Pretendo is here to save the day

Today, April 8th, 2024, at 4PM PT, marks the day in which Nintendo permanently ends support for both the 3DS and the Wii U online services, which include co-op play...
3. 169 replies

### GBAtemp Exclusive Introducing tempBOT AI - your new virtual GBAtemp companion and aide (April Fools)

Hello, GBAtemp members! After a prolonged absence, I am delighted to announce my return and upgraded form to you today... Introducing tempBOT AI 🤖 As the embodiment...
4. 98 replies

### Atmosphere CFW for Switch updated to pre-release version 1.7.0, adds support for firmware 18.0.0

After a couple days of Nintendo releasing their 18.0.0 firmware update, @SciresM releases a brand new update to his Atmosphere NX custom firmware for the Nintendo...
5. 96 replies

### The first retro emulator hits Apple's App Store, but you should probably avoid it

With Apple having recently updated their guidelines for the App Store, iOS users have been left to speculate on specific wording and whether retro emulators as we...
6. 95 replies

### Delta emulator now available on the App Store for iOS

The time has finally come, and after many, many years (if not decades) of Apple users having to side load emulator apps into their iOS devices through unofficial...
7. 66 replies

### Pokemon fangame hosting website "Relic Castle" taken down by The Pokemon Company

Yet another casualty goes down in the never-ending battle of copyright enforcement, and this time, it hit a big website which was the host for many fangames based and...
8. 57 replies

### Nintendo Switch firmware update 18.0.1 has been released

A new Nintendo Switch firmware update is here. System software version 18.0.1 has been released. This update offers the typical stability features as all other...
9. 54 replies

### MisterFPGA has been updated to include an official release for its Nintendo 64 core

The highly popular and accurate FPGA hardware, MisterFGPA, has received today a brand new update with a long-awaited feature, or rather, a new core for hardcore...
10. 53 replies

### Nintendo "Indie World" stream announced for April 17th, 2024

Nintendo has recently announced through their social media accounts that a new Indie World stream will be airing tomorrow, scheduled for April 17th, 2024 at 7 a.m. PT...

## Misc So I have a bunch of empty DVD-R discs. What should I do with them?

### Recent Content

12. #### ColecoDS - Improved

Help Users
• No one is chatting at the moment.
• @ Psionic Roshambo:
Gonna look into that when I get home
• @ K3Nv2:
Any good 3ds smut titles psi?
• @ Psionic Roshambo:
Lol I think there was some home brew
• @ K3Nv2:
Tap to get bigger!
• @ K3Nv2:
Lol I still remember the porn homebrew joke thread everyone was like it's not working
• @ BakerMan:
jus levelled up
• @ The Real Jdbye:
@K3Nv2 you mean the bricker?
+1
• @ BakerMan:
if you want smut on 3ds, just search porn on the browser lmao
• @ K3Nv2:
I like to interact with my smut ok
• @ BakerMan:
well then show them how to scratch it (this is a verbalase joke)
• @ The Real Jdbye:
@K3Nv2 you should get VR then
• @ K3Nv2:
Hands free vr
• @ BakerMan:
since you guys are so horny, who's up for smash or pass?
• @ K3Nv2:
Pass
• @ The Real Jdbye:
sure, it can be hands free
• @ K3Nv2:
Ending to the fallout series was lame could've gave us a bit more
• @ Psionic Roshambo:
you could say it fell out.
• @ K3Nv2:
Least they got head in the end
• @ NinStar:
quite ironic that brawlhalla has a far superior netcode compared to smash bros ultimate while offering free online play with crossplay support
• @ Veho:
The cybertruck is a death trap.
@ Veho: The cybertruck is a death trap.