What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-20 02:25:33
9.6.4. Beyond for Loops // Input Validation // while loops
const input = require('readline-sync'); let num = input.question('Please enter a positive number:'); num = Number(num); while (num <= 0) { num = input.question('Invalid input. Please enter a positive number:'); num = Number(num); } /*This prog... Add solution -
Java 2021-10-21 20:29:08
?whats is the difference between while loop and for loop
//First Code WHILE loop int x = 0; while (x < 10) { //Do Something while x is less than 10 // if you don't want infinity loop increse x x++; } //Second Code But Now Its FOR loop with the same int x with different different result int x = 10 ... Add solution -
Python 2021-10-19 07:24:07
how to make a number guessing game in python
# updated version import random # for instructions so that the user understands def instructions(): print("Welcome to the guessing game you will have 3 tries to pick a number 1-10") print("Good luck btw it's all random") inst... Add solution -
Python 2021-10-01 11:54:02
guessing game in python
# updated version import random # for instructions so that the user understands def instructions(): print("Welcome to the guessing game you will have 3 tries to pick a number 1-10") print("Good luck btw it's all random") inst... Add solution
Best helpers
Ranking is empty