+ 12

[ASSIGNMENT] Start with This Challenge #1

The Challenge is to make a Low-High Game in any language you may prefer to use. Description Of Game: A Game in which user has to enter a Number between 1 to 10(or what you want). The Number should be equal to Random Number generated by computer. Example are there for your help :- https://code.sololearn.com/cCy5FZ23L0fS/#rb An Upvote Please.

12th Dec 2017, 2:13 PM
Vishal Pal❄️⚛️
Vishal Pal❄️⚛️ - avatar
13 Answers
12th Dec 2017, 2:29 PM
Cool Codin
Cool Codin - avatar
12th Dec 2017, 5:07 PM
Justine Ogaraku
Justine Ogaraku - avatar
+ 10
https://code.sololearn.com/cZoXv7svk8Bb/?ref=app
9th Jan 2018, 10:02 PM
Raphael Williams
Raphael Williams - avatar
12th Jan 2018, 1:29 AM
Med Arezki
Med Arezki - avatar
+ 7
https://code.sololearn.com/c5jRCGQqt1nl/?ref=app
12th Dec 2017, 2:57 PM
...
+ 7
First Java code: (Give it as many inputs as you want and it'll loop through all of them) https://code.sololearn.com/c901nJcgR0sl/#java import java.util.Random; import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); Random rand = new Random(); int randNum = 0; int userInput = 0; boolean isPlaying = true; while(isPlaying) { System.out.println("Please input guess: "); userInput = scnr.nextInt(); System.out.println(":::Your guess is " + userInput + ":::"); randNum = (rand.nextInt(10) + 1); System.out.println(":::Random number is " + randNum + ":::"); if(userInput == randNum) { System.out.println("+++WINNER!+++"); } else { if(userInput > randNum){ System.out.println(">>>Your guess is too high! LOSER!<<<"); } else if (userInput < randNum){ System.out.println(">>>Your guess is too low! LOSER!<<<"); } } System.out.println(""); } } }
12th Dec 2017, 3:05 PM
AgentSmith
+ 5
This c++ code: You can set minimum and maximum values that computer & You can choose https://code.sololearn.com/ce5hBN5L5Xmj/#cpp don't forget to upvote <3 ^_^
13th Dec 2017, 9:28 AM
Light
Light - avatar
+ 5
First time working with Random class in C#, not sure if Next() is inclusive on both, or only on the first. Anyhow, here: https://code.sololearn.com/cEyzW7zhGTde/?ref=app
10th Jan 2018, 4:08 AM
LunarCoffee
LunarCoffee - avatar
13th Dec 2017, 2:07 AM
LunarCoffee
LunarCoffee - avatar
+ 4
Learning the basic html. any guess when I'll be good enough to do it?
13th Dec 2017, 3:09 AM
Pratik
Pratik - avatar
+ 4
In C, except 1 - 10 instead of 0 - 9. https://code.sololearn.com/c8S2tP6DmjxK/#c
13th Dec 2017, 4:01 AM
Cluck'n'Coder
Cluck'n'Coder - avatar
+ 3
(Application of random function) https://code.sololearn.com/ci12MbRj1H3k/?ref=app
26th Dec 2017, 7:01 AM
O_o
O_o - avatar