Discuss Scratch
- Discussion Forums
- » Project Save & Level Codes
- » Share your programs for cycle script
- MegaEliteCoder
-
100+ posts
Share your programs for cycle script
I made a programming language called cycle script https://scratch-mit-edu.ezproxyberklee.flo.org/projects/727820227/
You can share your programs here by using the export button and then copying the code
You can share your programs here by using the export button and then copying the code
- MegaEliteCoder
-
100+ posts
Share your programs for cycle script
#collatzconjecture↵n=input(“Enter n”)↵Warp↵While(not(comp(n,=,1)))↵calc = comp(div(n,2),=,round(div(n,2)))↵If(calc)↵N = div(n,2)↵End↵If(not(calc))↵N = add(mul(n,3),1)↵End↵Print(n)↵End↵End↵
- Seon8
-
33 posts
Share your programs for cycle script
loops = input(“Loops?”)↵i = 0↵n = 2↵While(comp(i, <, loops))↵n = mul(n, n)↵i = add(i,1)↵Print(n)↵End↵Squares itself…
- MegaEliteCoder
-
100+ posts
Share your programs for cycle script
cool!loops = input(“Loops?”)↵i = 0↵n = 2↵While(comp(i, <, loops))↵n = mul(n, n)↵i = add(i,1)↵Print(n)↵End↵Squares itself…
- Seon8
-
33 posts
Share your programs for cycle script
#guessing game↵number = 41↵guess = input(“Guess a number 1-100”)↵While(not(comp(guess, =, number)))↵If(comp(guess, <, number))↵print(“Too low!”)↵else↵print(“Too high!”)↵End↵guess = input(“Guess again!”)↵End↵End↵print(“You guessed it!”)↵“You guessed it!” pops up randomly some times but works besides that. Number isn't actually random because I don't think that command exists… didn't know you could use “rand(min, max)”
Last edited by Seon8 (Sept. 5, 2022 12:42:37)
- MegaEliteCoder
-
100+ posts
Share your programs for cycle script
#guessing game↵number = 41↵guess = input(“Guess a number 1-100”)↵While(not(comp(guess, =, number)))↵If(comp(guess, <, number))↵print(“Too low!”)↵else↵print(“Too high!”)↵End↵guess = input(“Guess again!”)↵End↵End↵print(“You guessed it!”)↵“You guessed it!” pops up randomly some times but works besides that. Number isn't actually random because I don't think that command exists…
Rand(min,max)
Lol it has random nums
- MegaEliteCoder
-
100+ posts
Share your programs for cycle script
#guessing game↵number = 41↵guess = input(“Guess a number 1-100”)↵While(not(comp(guess, =, number)))↵If(comp(guess, <, number))↵print(“Too low!”)↵else↵print(“Too high!”)↵End↵guess = input(“Guess again!”)↵End↵End↵print(“You guessed it!”)↵“You guessed it!” pops up randomly some times but works besides that. Number isn't actually random because I don't think that command exists…
Weird I’ll have to debug that it shouldn’t pop up
- Seon8
-
33 posts
Share your programs for cycle script
#guessing game↵number = rand(1,100)↵guess = input(“Guess a number 1-100”)↵While(not(comp(guess, =, number)))↵If(comp(guess, <, number))↵print(“Too low!”)↵else↵print(“Too high!”)↵End↵guess = input(“Guess again!”)↵End↵print(“You guessed it!”)↵Added actual random numbers. Still prints that you guessed when you haven't sometimes but doesn't stop the code…
Last edited by Seon8 (Sept. 5, 2022 13:31:57)
- MegaEliteCoder
-
100+ posts
Share your programs for cycle script
I’ll debug that#guessing game↵number = rand(1,100)↵guess = input(“Guess a number 1-100”)↵While(not(comp(guess, =, number)))↵If(comp(guess, <, number))↵print(“Too low!”)↵else↵print(“Too high!”)↵End↵guess = input(“Guess again!”)↵End↵print(“You guessed it!”)↵Added actual random numbers. Still prints that you guessed when you haven't sometimes but doesn't stop the code…
- MegaEliteCoder
-
100+ posts
Share your programs for cycle script
#guessing game↵number = rand(1,100)↵guess = input(“Guess a number 1-100”)↵While(not(comp(guess, =, number)))↵If(comp(guess, <, number))↵print(“Too low!”)↵else↵print(“Too high!”)↵End↵guess = input(“Guess again!”)↵End↵print(“You guessed it!”)↵Added actual random numbers. Still prints that you guessed when you haven't sometimes but doesn't stop the code…
I fixed it.. I spent an hour looking debugging and I only had to change 2 blocks \:
- 2rare4you
-
1 post
Share your programs for cycle script
#fast growing number↵number = add(10, 9e-16)↵While(comp(3, =, 3))↵print(number)↵number = mul(number, div(number, 10))↵End↵print(“You guessed it!”)↵
thing that can actually square itself and then divide by 10
thing that can actually square itself and then divide by 10
- Discussion Forums
- » Project Save & Level Codes
-
» Share your programs for cycle script