I am looking on some help on a program where i have the user enter a random number from say 1-20. I do it until number is chosen. Meanwhile it tells the user it it has gotten cooler or warmer from their last guess.
ty, any help is appreciated.
8 2152
I am looking on some help on a program ...
Our experts are generally happy to help. But you need to give us some idea of what to help with.
What version of VB are you using? What have you tried? What are you having trouble with?
Vb6, i have tried doing such as using 2 vars, 1 for first input and 1 for next input so it is easier. But i have not gone far, it wont display right answer.
I am looking on some help on a program where i have the user enter a random number from say 1-20. I do it until number is chosen. Meanwhile it tells the user it it has gotten cooler or warmer from their last guess.
ty, any help is appreciated.
I think He/She want to make a programe having artificial intelligence which will guess the mood of user either it is Cool or Warmer from their last guess.
Is it right?
I think?
GOODLUCK
ALI
Actual number is 16.
For instance, the user guesses 5 the first time;
the user guesses 8 the second time; Msgbox - "you got warmer than your last guess"
the user guesses 7 the third time; Msgbox-"you got colder"
It basically loops around until number is guessed.
Actual number is 16.
For instance, the user guesses 5 the first time;
the user guesses 8 the second time; Msgbox - "you got warmer than your last guess"
the user guesses 7 the third time; Msgbox-"you got colder"
It basically loops around until number is guessed.
From your logic it seems ,only checking if the previous number is greater or lesser that the current number will be sufficent.
> Hotter
< Cooler
= ???
From your logic it seems ,only checking if the previous number is greater or lesser that the current number will be sufficent.
> Hotter
< Cooler
No, the logic is that "hotter" or "warmer" means closer to the right answer. "Cooler" means further away, or "more wrong".
This is a fairly common technique (in some countries) for indicating whether someone is getting closer to or further away from the correct answer, or place.
This is a fairly common technique (in some countries) for indicating whether someone is getting closer to or further away from the correct answer, or place.
Yeap, here in mexico it's very common. then i think you can just define 3 integers (k,m,n) lets make k the "correct answer" with
k = int(rnd*20)+1
and then it should look like: - m=inputbox ("First guess")
-
do
-
if m = k then exit do
-
n=imputbox("next guess")
-
if (m-k)^2 > (n-k)^2 then
-
msgbox("warmer")
-
elseif (m-k)^2 > (n-k)^2 then
-
msgbox("cooler")
-
else
-
msgbox("neither cooler nor warmer")
-
end if
-
m=n
-
loop
-
msgbox("congrats")
HTH
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Michael Foord |
last post by:
#!/usr/bin/python -u
# 15-09-04
# v1.0.0
# auth_example.py
# A simple script manually demonstrating basic authentication.
# Copyright Michael Foord
# Free to use, modify and relicense.
#...
|
by: bidalah |
last post by:
Hello,
I am looking for basic info on installing and using MSDE.
I am trying to install and play with MSDE on my PC (Win2000). I
finally managed to work my way through installation, and named...
|
by: sathyashrayan |
last post by:
(This is not a home work question)
Dear group,
I want a program to find one number between a set of
natural number.A program to guess a number in between a
Natural number set.This should be a...
|
by: trippeer |
last post by:
I have the source code to an old BASIC program that a friend of mine
would like to run online. I am a beginner at JS, but I think that it
would be a good choice for the project. My background is in...
|
by: moopower |
last post by:
I have to do the following:
For this project, you are to create a simple number guessing game. The program should
begin by asking the user for a range (i.e. a minimum number and a maximum number)...
|
by: Simon Walsh |
last post by:
I'm an Electronics student in college and I'm currently working on a
project. I was given a circuit diagram for my project, from which I had to
design a printed circuit board to be sent off and...
|
by: Randy Reimers |
last post by:
(Hope I'm posting this correctly, otherwise - sorry!, don't know what else
to do)
I wrote a set of programs "many" years ago, running in a type of basic,
called "Thoroughbred Basic", a type of...
|
by: Dan Upton |
last post by:
On Wed, May 21, 2008 at 12:55 PM, abhilash pp <afilash+python@gmail.comwrote:
That won't work as written, because it'll print "you failed," then
break, then print "You guessed it!"...
As an...
|
by: =?Utf-8?B?UGV0ZXIgSw==?= |
last post by:
I am working with Visual Studio or alternately with Expression Web. I need
to create about 50 aspx pages with about 1200 thumbnali images, typically
arranged in three to four groups per page,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |