This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "Hallo wie ist ihr Name?" | |
@name = gets.chomp | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu dünn\n-oder genau richtig sind." | |
def hallo | |
puts "Geben sie bitte ihr Gewicht." | |
@gewicht = gets.chomp | |
puts "Geben sie bitte ihre Groese in >>METERN<< ein." | |
@groese = gets.chomp | |
puts "#{@name}, sie sind #{@groese} Groß und wiegen #{@gewicht}.\n Ist das richtig?\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BMIRechner | |
def initialize() | |
puts "Hallo wie ist ihr Name?" | |
@name = gets.chomp | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
self.hallo() | |
end | |
def hallo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BmiRechner | |
def name | |
puts "Hallo wie ist ihr Name?" | |
@name = gets.chomp | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def hallo | |
puts "Geben sie bitte ihr Gewicht." | |
@gewicht = gets.chomp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BmiRechner | |
def name | |
puts "Hallo wie ist ihr Name?" | |
@name = gets.chomp | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def hallo | |
puts "Geben sie bitte ihr Gewicht." | |
@gewicht = gets.chomp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BmiRechner | |
def initialize | |
self.get_name | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def get_name | |
puts "Hallo wie ist ihr Name?" | |
@name = gets.chomp | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$KCODE = "UTF-8" | |
class BmiRechner | |
def initialize | |
self.get_name | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def get_wert(frage) | |
puts(frage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$KCODE = "UTF-8" | |
class BmiRechner | |
def initialize | |
self.get_name | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def get_wert(frage) | |
puts(frage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$KCODE = "UTF-8" | |
class BmiRechner | |
def initialize | |
self.get_name | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def get_wert(frage) | |
puts(frage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$KCODE = "UTF-8" | |
class BmiRechner | |
def initialize | |
self.get_name | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def get_wert(frage) | |
puts(frage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'tk' | |
class BMI | |
def run | |
@window.mainloop | |
end | |
def initialize | |
@window = TkRoot.new(:title => 'BMI', 'height' => 304, 'width' => 258) do |
OlderNewer