Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simple dating program

 
Brad Cantrell
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a dating program Im making that compares profiles of 4 people on a scale of 0.0 to 1.0. The data the people have is their name, sex, desired sex of mate which has to be mutual or they automatially get 0.0, otherwise they are compared with their finance and romance numbers both between 0.0 and 1.0 and then the greater the difference between these averaged numbers the lower the overall score. This program is giving me weird results, and its frying my brain to figure out why, if anyone can help Id appreciate it.


 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "giving me weird results" mean? What is it doing, and what were you expecting?
 
Brad Cantrell
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf- This is what I get when I run the program, I just think its strange that each person is only getting a response from one person of the opposite sex when there are two people of the opposite sex that they should get a response from.

John
John fit: 0.0
Mary fit: 0.0
George fit: 0.0
Ellen fit: 0.060000000000000005
Mary
John fit: 0.0
Mary fit: 0.0
George fit: 0.06000000000000001
Ellen fit: 0.0
George
John fit: 0.0
Mary fit: 0.0
George fit: 0.0
Ellen fit: 0.30000000000000004
Ellen
John fit: 0.060000000000000005
Mary fit: 0.0
George fit: 0.0
Ellen fit: 0.0
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It may be due to the fact that you're mixing uppercase and lowercase letters for the genders, which you are then comparing using "==". Remember that 'M' != 'm'
 
Brad Cantrell
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah you're right, thanks Ulf.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic