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
ale4655 [162]
3 years ago
15

Write a program that initializes a string variable and prints the first three characters, followed by three periods, and then th

e last three characters. For example, if the string is initialized to "Mississippi", then print Mis...ppi.
Computers and Technology
1 answer:
d1i1m1o1n [39]3 years ago
8 0

firstly we have to initialize the variable, means to give variable a value and then print the statement

string = "fahadisahadam"

print(string[:3]+"..."+string[-3:])

string is a data type that contains two or more characters.

means the string is fahadisahadam so the print will print first three characters. follow by three periods(...) and then last three characters.

The output will be:

fah...dam

You might be interested in
What are the four main types of section breaks? Check all that apply.
Romashka-Z-Leto [24]
The answer would be next page, continuous, even page, and odd page.
5 0
3 years ago
Read 2 more answers
In this question, you will experimentally verify the sensitivity of using a precise Pi to the accuracy of computing area. You ne
zhannawk [14.2K]

Answer:

Follows are the code to this question:

import math as x #import math package

#option a

radius = 10#defining radius variable  

print("radius = ", radius)#print radius value

realA = x.pi * radius * radius#calculate the area in realA variable

print("\nrealA = ", realA)#print realA value

#option b

a1 = 3.1  * radius * radius#calculate first area in a1 variable  

print("Area 1= ", a1)#print Area

print("Percentage difference= ", ((realA - a1)/realA) * 100) #print difference  

a2 = 3.14  * radius * radius#calculate first area in a2 variable                            

print("Area 2= ", a2)#print Area

print("Percentage difference= ", ((realA - a2)/realA) * 100)#print difference  

a3 = 3.141  * radius * radius#calculate first area in a2 variable                       print("Area 3= ", a3)#print Area

print("Percentage difference= ", ((realA - a3)/realA) * 100) #print difference  

Output:

please find the attached file.

Explanation:

In the given Python code, firstly we import the math package after importing the package a "radius" variable is defined, that holds a value 10, in the next step, a "realA" variable is defined that calculate the area value.

In the next step, the "a1, a2, and a3" variable is used, which holds three values, that is "3.1, 3.14, and 3.141", and use the print method to print its percentage difference value.  

4 0
3 years ago
Samantha plans an investigation in which she will study a population of animals. Which of these answers best describes the focus
Y_Kistochka [10]
The cats and dogs at a local shelter. Because there is so many in shelters
4 0
4 years ago
Which describes a design theme in PowerPoint? a set of elements that unify the slides and complement the topic a printed handout
chubhunter [2.5K]

a set of elements that unify the slides and complement the topic

5 0
3 years ago
Read 2 more answers
The ______ layer adds a header to the packet coming from the upper layer that includes the logical addresses of the sender and r
rjkz [21]

Answer: Network layer

Explanation: Network layer the third layer of the OSI model architecture which is focused on the operation of making the logical paths for the data packets so that they can flow.

The packets carry the addresses of the sender port and the destination port which is added to the header of the packet and then the path is established accordingly so that the packet can travel.

4 0
3 years ago
Other questions:
  • Using-R,-create-a-linear-model-to-represent-the-coefficients-for-the-objects-fw2-and-fwe-data..
    10·1 answer
  • could someone plz enplane to me what iOS r because i go to donlaod a app on my phone and it says i need to upgrade to a iOS 8.0
    14·2 answers
  • How can touch typing quickly but accurately improve your earnings (the money you can make)
    15·2 answers
  • Working in a meat factory packaging and shipping the meat deliveries falls into which agricultural cluster?
    7·1 answer
  • What are midi signals
    12·2 answers
  • When a binary tree is full to its next to last level and its leaves on the last level are filled from left to right the tree is
    14·1 answer
  • If an individual receives 1.8 mGy while standing 4 ft from a source of radiation for 2 minutes, which of the following option(s)
    9·1 answer
  • Look at the slide.
    10·2 answers
  • Radio spectrum is the part of the complete range of electromagnetic waves that is used for radio communication from
    14·1 answer
  • Similarities between incremental and<br> prototyping models of SDLC
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!