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
Margarita [4]
3 years ago
14

Write a program named split_me.py that accepts a string in the format Age.FirstName and returns the value FirstName is Age years

old. Length of Mary is X. Example: 22.Mary >> Mary is 22 years old. Length of Mary is 4
Computers and Technology
1 answer:
zmey [24]3 years ago
5 0

age,name = input('Enter a string: ').split('.')

print(name+' is '+age+' years old. Length of '+name+' is '+str(len(name)))

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

You might be interested in
Write a program that will take a file named Celsius.dat that contains a list of temperatures in Celsius (one per line), and will
dedylja [7]

Answer:

celciusFile=open("celcius.dat","r")

fahrenheitFile=open("fahrenheit.dat","w")

# Iterate over each line in the file

for line in celciusFile.readlines():

# Calculate the  fahrenheit

   fahrenheit = 9.0 / 5.0 * float(line) + 32

#write the  Fahrenheit values to the  Fahrenheit file

   fahrenheitFile.write("%.1f\n" % fahrenheit)

# Release used resources

celciusFile.close()

fahrenheitFile.close()

Explanation:

<em></em>

<em>celciusFile=open("celcius.dat","r") </em>

<em>fahrenheitFile=open("fahrenheit.dat","w") </em>

open the Celsius file in the read mode and assign it to a variable.

open the  Fahrenheit file in the write mode and assign it to a variable.

read mode means you can only use/read the content in the file but cannot alter it.

write mode means you can write new data to the file.

<em> </em>

<em />

  • <em># Iterate over each line in the file </em>

<em>for line in celciusFile.readlines(): </em>

The values contained in the Celsius file are collected.

  • <em># Calculate the  fahrenheit </em>

<em>    fahrenheit = 9.0 / 5.0 * float(line) + 32 </em>

The values are then converted to Fahrenheit.

  • <em>#write the  Fahrenheit values to the  Fahrenheit file</em>

<em>    fahrenheitFile.write("%.1f\n" % fahrenheit) </em>

The Fahrenheit values are written to the  Fahrenheit file

<em>%.1f</em><em>  is used to specify the number of digits after decimal. and </em><em>\n </em><em>adds a new line.</em>

<em />

  • <em># Release used resources </em>

<em>celciusFile.close() </em>

<em>fahrenheitFile.close() </em>

All files are closed

<em />

5 0
3 years ago
How do device drivers vary in complexity?​
BartSMP [9]
I wanna know so bad i can’t wait till someone answers
3 0
3 years ago
How can a user access the Mailbox Cleanup tools?
antiseptic1488 [7]

Answer:

Sorry this isn’t an answer but does anyone know of a quizlet for the Microsoft Office course because I can’t find anything anywhere. Help a fellow student out. I need answers.

Explanation:

8 0
3 years ago
Read 2 more answers
Hoelzer's Cakes and Pastries has asked you to develop a newsletter layout using Word 2016. The owners of the bakery want to use
kompoz [17]

The features of Word 2016 that I would use to capture the attention of the target audience are:

  • The Ribbon
  • Themes and Styles
  • Table of Contents
  • Format Painter
  • Tell me.

<h3>What are the features about?</h3>

The Ribbon will help me to Redesigned and Optimized my work in the right structure.

Themes and Styles will make the work to be beautiful and capture the target audience as well as other factors.

The features of Word that you find difficult to use are:

  • Change a bulleted list to a kind of SmartArt.
  • Quick selection methods.

Learn more about Microsoft word from

brainly.com/question/20659068

#SPJ1

5 0
2 years ago
Personal statements School leaver
Tcecarenko [31]

Answer:

points yes yes yes

Explanation:

points

7 0
3 years ago
Other questions:
  • A program is run line by line to determine the source of a logic error. Which best describes the specific tool being used? (A.)c
    5·1 answer
  • This LEGENDARY character made a much-celebrated comeback in 2017. What was the name of the villain he faced in this epic tale?
    7·2 answers
  • Que es la fisiconometria?
    10·1 answer
  • How to put vibratuon when tapping on keyboard galaxy s3?
    5·1 answer
  • Create 3–5 questions about your data that can be answered by sorting and filtering the database.
    8·1 answer
  • 4-Translate the following C program to MIPS assembly program (Please explain each instruction in your code by a comment and subm
    6·1 answer
  • Which of the following is a correct statement about writing down passwords on a ""cheat sheet?""
    7·1 answer
  • I need help with this line of code:
    5·1 answer
  • Lesson 12: while loops with the farmer. Number 9.
    10·2 answers
  • What methods do you use when researching a complicated or difficult subject? What tools are most useful to narrowing down and va
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!