1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
frosja888 [35]
3 years ago
12

Write a program that prompts the user to enter a Social Security number in the format ddd-dd-dddd, where d is a digit. The progr

am displays Valid SSN for a correct Social Security number or Invalid SSN otherwise.
Computers and Technology
1 answer:
koban [17]3 years ago
3 0

ssn = input("Enter a valid Social Security number: ")

dashes = 0

nums = 0

message = "Invalid SSN"

if len(ssn) == 11:

   for x in ssn:

       if x.isdigit():

           nums += 1

       elif x == "-":

           dashes += 1

if nums == 9 and dashes == 2:

   message = "Valid SSN"

print(message)

I wrote my code in python 3.8. I hope this helps!

You might be interested in
In creating a professional action plan it's important to
blagie [28]
Whenever creating a professional action plan, it might be easier to do an "if...then..." plan, or just a daily plan, like this:

Monday:
Kitchen:
 Do dishes
 Sweep floor
 Wipe counters

Bedroom:
 do laundry etc,
5 0
3 years ago
What is ransomware<br>я​
Novosadov [1.4K]

Answer:

Ransomware is malicious software that infects your computer and displays messages demanding a fee to be paid in order for your system to work again. It has the ability to lock a computer screen or encrypt important, predetermined files with a password.

Explanation:

:)

5 0
3 years ago
Why are typewriter keys arranged the way they are?
loris [4]
They are arranged the way they are because of the QWERTY layout. It was used to slow down how people typed so they wouldn't get the typewriter jammed. Hope this helps. :)
4 0
3 years ago
What is one of the main problems with shared web hosting? Select one: Sites that share resources are less susceptible to hacking
Pani-rosa [81]

Answer:

If one or more of the shared sites go down, then there is a good chance that your site will go down as well.

Explanation:

Shared web hosting is a form of web hosting service whereby more than one websites are placed on a single web server that connects to the internet.

Though it is cheaper, it has various problems. And over time, it has been concluded that the major problem associated with shared web hosting is the security issue.

This implies that "If one or more of the shared sites go down, then there is a good chance that your site will go down as well."

Some other problems associated with Shared web hosting are poor value, less flexibility, none advanced features, slow service, less support.

4 0
3 years ago
Artificial intelligence seeks ways to improve a computer's capabilities in ____ and reasoning tasks. intellectual computational
Tatiana [17]
The answer is Computational
4 0
3 years ago
Other questions:
  • From the video "Your Password Sucks", using computer power to guess your password by trying multiple variations one after the ot
    15·2 answers
  • A network administrator is required to upgrade wireless access to end users in a building. To provide data rates up to 1.3 Gb/s
    12·1 answer
  • The domain name service (dns is a distributed database that allows users to communicate with each other computers by:
    7·1 answer
  • What is the full form of icimod?
    6·1 answer
  • i have a class for computers and i need a free hardrive are there any websites that give me one for free in 3 days??​
    15·1 answer
  • Explain why there are fundamental ideas of software engineering that apply to all types of software systems.
    7·1 answer
  • linda has written a program that works well on various operating systems, but she needs to increase the readability of the progr
    5·1 answer
  • Difrent between computer and computer system​
    9·1 answer
  • A friend of mine had a samsung j2 phone and someone with a iphone placed something in her phone she thought was malware in her p
    7·1 answer
  • a benefit of cloud computing is scaling up or down as demand for your services increases or decreases. the word that is most ass
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!