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
MakcuM [25]
3 years ago
11

Can someone help me with Exercise 7.1.5: Initials on codehs.

Computers and Technology
1 answer:
Ber [7]3 years ago
7 0

7.1.5 Codehs:

Write a program that gets a string containing a person's first, middle and last names, and then display their first, middle and last initials. For example, if the user enters John William Smith, the program should display J. W. S. [In python]

Answer:

first = input("First name: ")

middle = input("Middle name: ")

last = input("Last name: ")

print(first[0]+". "+middle[0]+". "+last[0]+".")

Explanation:

This line prompts user for first name

first = input("First name: ")

This line prompts user for middle name

middle = input("Middle name: ")

This line prompts user for last name

last = input("Last name: ")

This line prints the name initials

print(first[0]+". "+middle[0]+". "+last[0]+".")

You might be interested in
Dustin is editing a SmartArt graphic. He wants all three shapes to be different colors.
lilavasa [31]

Answer:

click on Design tab → select associated shape → adjust color

Explanation:

I think it is that but i'm not positive. I will know in a little bit since I am taking the test right now.

6 0
3 years ago
Your program Assignment Write a program that reads a sentence as input and converts each word to "Pig Latin". In one version of
xxTIMURxx [149]

Answer:

theSentence = input('Enter sentence: ')

theSentence = theSentence.split()

sentence_split_list =[]

for word in theSentence:

  sentence_split_list.append(word[1:]+word[0]+'ay')

sentence_split_list = ' '.join(sentence_split_list)

print(sentence_split_list)

Explanation:

Using the input function in python Programming language, the user is prompted to enter a sentence. The sentence is splited and and a new list is created with this statements;

theSentence = theSentence.split()

sentence_split_list =[ ]

In this way every word in the sentence becomes an element in this list and individual operations can be carried out on them

Using the append method and list slicing in the for loop, every word in the sentence is converted to a PIG LATIN

The attached screenshot shows the code and output.

5 0
3 years ago
Write the code in python to ask the user to input two integers. Your program will then print the greatest common divisor of the
Hunter-Best [27]

import math

num1 = int(input("Enter a number: "))

num2 = int(input("Enter a number: "))

print(math.gcd(num1, num2))

The gcd() - greatest common divisor function, which is part of the math module works perfectly in this situation.

3 0
3 years ago
Miriam is very detail oriented within the first month of her new job as a network support specialist she became very good at dia
love history [14]
What is the question?
3 0
3 years ago
The database structure in a dbms is stored as a _____.
Colt1911 [192]
This will be stored as a collection of files
6 0
3 years ago
Other questions:
  • Do Y’all know how to view your answers to others people questions on your profile? Please answer fast
    14·1 answer
  • The _____ icon looks like a clipboard with a page of paper attached. Cut Copy Paste Clipboard
    5·1 answer
  • Samantha writes technical content for a webpage and uploads it to the webpage. What should she do to ensure that the content, wh
    11·2 answers
  • What is the definition of framerate?
    7·1 answer
  • Which of the following has likely attended vocational school?
    10·1 answer
  • In the process of benchmarking for a variable expense (such as payroll) the typical metrics used are "Total Dollars" and "Dollar
    8·1 answer
  • This program will get you used to retrieving a value from a function. The function should be named getRandomNumber. The function
    15·1 answer
  • Which four of the following hardware components are specifically used to enable networking and are not part of a stand-alone com
    13·2 answers
  • Describe how communication strengthens relationship at work and, as a result, increases your productivity
    9·1 answer
  • Consider the packets exchanged in TCP connection setup between Host A and Host B. Assume that Host A's initial sequence number i
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!