subject

States The 44 lines of the file PresStates. txt contain the names of the states that produced each of the first 44 presidents. The first four lines of the file contain the states Virginia, Massachusetts, Virginia, and Virginia. Write a program that deletes all duplications from the file and also displays the number of states that have produced presidents. PresStates. txt is as follows:
Virginia
Massachusetts
Virginia
Virginia
Virginia
Massachusetts
Tennessee
New York
Ohio
Virginia
Tennessee
Lousiana
New York
New Hampshire
Pennsylvannia
Illinois
Tennessee
Illinois
Ohio
Ohio
New York
New York
Indiana
New York
Ohio
New York
Ohio
New Jersey
Ohio
Massachusetts
California
New York
Missouri
Kansas
Massachusetts
Texas
California
Michigan
Georgia
California
Texas
Arkansas
Texas
Illinois
Outcome:
18 different states have produced presidents of the United States.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:30, westjayson69
Requirement types discussed during software development include functional and color scheme nonfunctional and code style constraint and nonfunctional fashionable and functional.
Answers: 2
image
Computers and Technology, 24.06.2019 10:00, wwwcarolynzouowficz
3. what do the terms multipotentialite, polymath, or scanner mean?
Answers: 2
image
Computers and Technology, 24.06.2019 18:20, 12375819
Use a while-end loop in a script file to calculate the sum of the first n terms of the series: summation sign on the top n bottom k=1 : )^k * k^2 +5k)/3^k show the script file and the two results of n = 10 and n = 20.
Answers: 2
image
Computers and Technology, 24.06.2019 21:30, asimms8504
Suppose a router has built up the routing table shown in the table. subnet number 128.96.39.00 28.96.39.128 128.96.40.00 192.4.153.0 default) subnet mask 255.255.255.128 255.255.255.128 255.255.255.128 255.255.255.192 nexthop interface 0 interface 1 r2 r3 r4. the router can deliver packets directly over interfaces 0 and 1, or it can forward packets to routers r2, r3, or r4. describe what the router does with a packet addressed to each of the following destinations: (a) 128.96.39.10 (b) 128.96.40.12 (c) 128.96.40.151 (d) 192.4.153.17 (e) 192.4.153.90
Answers: 3
You know the right answer?
States The 44 lines of the file PresStates. txt contain the names of the states that produced each o...

Questions in other subjects: