This file contains hidden or 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
main () | |
{ | |
var x = 3; | |
var y = 2; | |
print ("adding"); | |
print (x+y); | |
print ("subtracting"); | |
print (x-y); | |
print ("Multiplying"); | |
print (x*y); |
This file contains hidden or 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
main () | |
{ | |
var computer = 2; | |
var player = 3; | |
if (computer > player) | |
{ | |
print ("my number is higher"); | |
} |
This file contains hidden or 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
import 'dart:io'; | |
import 'dart:math'; | |
main () | |
{ | |
Random r = Random (); | |
int computer = r.nextInt (11); | |
print (computer); | |
print ("please guess number"); | |
while (true) |
This file contains hidden or 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
import 'dart:math'; | |
import 'dart:io'; | |
add (int first,int second,int playeranswer) | |
{ | |
if (first + second == playeranswer) | |
{ | |
print ("you got it!"); | |
} | |
if (first + second != playeranswer) |
This file contains hidden or 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
main () | |
{ | |
int computer = 7; | |
String playerstring = stdin.readLineSync(); | |
if (computer > player) | |
{ | |
print ("my number is higher"); | |
} | |
if (computer < player) |
This file contains hidden or 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
takeoff () | |
{ | |
print ("take off"); | |
} | |
fly () | |
{ | |
takeoff (); | |
print ("flying"); | |
} |
This file contains hidden or 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
import 'dart:io'; | |
import 'dart:math'; | |
main () | |
{ | |
Random r = Random (); | |
int computer = r.nextInt (11); | |
print ("please start guessing the number"); | |
while (true) | |
{ | |
String playerstr = stdin.readLineSync (); |
This file contains hidden or 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
main () | |
{ | |
var points; | |
points = 5000; | |
print (points); | |
points = points + 100; | |
print (points); | |
points = points + 200; | |
print (points); | |
} |
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
import 'dart:math'; | |
void main() { | |
runApp(new GuessNumberGame()); | |
} | |
class GuessNumberGame extends StatefulWidget { | |
@override | |
_GuessNumberState createState() => _GuessNumberState(); | |
} | |
class _GuessNumberState extends State<GuessNumberGame> { |
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
import 'dart:math'; | |
void main() { | |
runApp(new HelloWorld()); | |
} | |
class HelloWorld extends StatefulWidget { | |
@override | |
_HelloWorldState createState() => _HelloWorldState(); | |
} | |
class _HelloWorldState extends State<HelloWorld> { |