skip to main content
Quorum
Learn
Hour of Code
Reference
Libraries
Download
Bugs
My Projects
Login
Quorum Login
Login
Cancel
Sign up for an account
"IPwithDNS" by Quorum
This is a public project. Anyone can view it.
IPwithDNS
Code Area
1
use Libraries.Containers.Array use Libraries.Compute.Random class Main Array
ipArray Random ran boolean validInput = false action Main ipArray:Add(90.124) ipArray:Add(8.71) ipArray:Add(43.255) ipArray:Add(9.154) ipArray:Add(80.211) ipArray:Add(11.23) ipArray:Add(504.9) ipArray:Add(23.98) ipArray:Add(89.543) ipArray:Add(16.9) ipArray:Add(78.453) integer currentPosition = ran:RandomIntegerBetween(0, 10) number currentIP = ipArray:Get(currentPosition) repeat until validInput = true text userInput = input("Enter your friend's name for DNS to look up the IP address.") if userInput = "Jane" output "Jane's current IP address is " + currentIP + ", Connection in progress ..." output "Hi this is Jane" validInput = true elseif userInput = "Greg" output "Greg's current IP address is " + currentIP + ", Connection in progress ..." output "Hi this is Greg" validInput = true elseif userInput = "Kit" output "Kit's current IP address is " + currentIP + ", Connection in progress ..." output "Hi this is Kit" validInput = true elseif userInput = "Beth" output "Beth's current IP address is " + currentIP + ", Connection in progress ..." output "Hi this is Beth" validInput = true elseif userInput = "Mary" output "Mary's current IP address is " + currentIP + ", Connection in progress ..." output "Hi this is Mary" validInput = true else validInput = false end end end end
Build (CTRL+B)
Run (CTRL+R)
Stop Program
Save this Project
Project Name:
Save Project
Cancel
Load a Project
Load Project
Cancel
Save
Load
Embed
Output Area