//Shipra Gupta //Processing, Input2 //create a typing program to display a different image for each letter on the keyboard. PImage mercury; PImage venus; PImage earth; PImage mars; PImage jupiter; PImage saturn; PImage uranus; PImage neptune; PImage pluto; void setup(){ size(900, 100); background(0); PFont caslon; caslon = loadFont("caslon.vlw"); textFont(caslon); text("Type the first alphabet of planets", 250, 50); if(keyPressed == true){ background(0); } } void draw(){ if (keyPressed==true){ if(key == 'm'){ background(0); mercury = loadImage("Mercury.gif"); image(mercury, 0, 20); } if(key == 'v'){ venus = loadImage("Venus.gif"); image(venus, 60, 20); } if(key == 'e'){ earth = loadImage("Earth (Clouds).gif"); image(earth, 120, 20); } if(key == 'm'){ mars = loadImage("Mars.gif"); image(mars, 180, 20); } if(key == 'j'){ jupiter = loadImage("Jupiter.gif"); image(jupiter, 240, 20); } if(key == 's'){ saturn = loadImage("Saturn.gif"); image(saturn, 300, 20); } if(key == 'u'){ uranus = loadImage("Uranus.gif"); image(uranus, 360, 20); } if(key == 'n'){ neptune = loadImage("Jupiter.gif"); image(neptune, 420, 20); } if(key == 'p'){ pluto = loadImage("Jupiter.gif"); image(pluto, 480, 20); } } }