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
yuradex [85]
3 years ago
7

1| def saveUserProfile(firstName, lastName, age, height, country):

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

Answer:

Joyner

David

USA

1.8

30

Explanation:

def saveUserProfile(firstName, lastName, age, height, country):

This is the definition of function named saveUserProfile which accepts the following parameters:

  • firstName
  • lastName
  • age
  • height
  • country

filename = lastName + firstName + ".txt"

When the file is created it will be named as the lastName and firstName string combined with .txt as extension. For example if the lastName contains the name string Joyner and firstName contains the name David then the file created to be written is named as JoynerDavid.txt

outputFile = open(filename, "w")

This statement uses open() method in write mode and uses outputFile object to access the file. "w" represents write mode i.e. file is opened in write mode to write on it.

a) Joyner is written on line 1 of that file because of the following statement of above function:

print(lastName, file = outputFile)

This statement prints the string stored in lastName i.e. Joyner. Here outputFile opens the file in "w" write mode and writes the last name to the first line of the file.

b) David is written on line 2 of that file because of the following statement of above function:

print(firstName, file = outputFile)

This statement prints the string stored in firstName i.e. David. Here outputFile opens the file in "w" write mode and writes the first name to the second line of the file.

c) USA is written on line 3 of that file because of the following statement of above function:

print(country, file = outputFile)

This statement prints the data stored in country i.e. USA. Here outputFile opens the file in "w" write mode and writes the country name to the third line of the file.  

d) 1.8 is written on line 4 of that file because of the following statement of above function:

print(height, file = outputFile)

This statement prints the value stored in height i.e. 1.8. Here outputFile opens the file in "w" write mode and writes the height value to the fourth line of the file.  

e) 30 is written on line 5 of that file because of the following statement of above function:

print(age, file = outputFile)

This statement prints the value stored in age parameter of function saveUserProfile i.e. 30. Here outputFile opens the file in "w" write mode and writes the age value to the fifth line of the file.  

You might be interested in
Your recovery/recycling machine has r-502 refrigerant in it. you now have to recover refrigerant from a unit with r-22. what mus
zimovet [89]
Recover as much of the R-502 from the recovery unit as possible, change filter, and evacuate. In addition, to alter the compressor on a system containing R-410A, the person must isolate the compressor then evacuate the isolated section of the system to atmospheric pressure and hold. If system pressure does not increase, then remove the compressor. The recovered refrigerant may encompass acids, moisture and oils and every air conditioning or refrigerating system should be secure by a pressure relief device. 
5 0
3 years ago
"In a(n) _____ file, each alphabetic, numeric, or special character is represented with a 7-bit binary number."
natita [175]

Answer:

ASCII is the correct answer for the above question.

Explanation:

  • ASCII is used to encode any character which is understood and used by the computer system.
  • It is also known as the American standard code for information interchange. It is used to represent any character in the form of 7 bit-binary number which can be used for the computer system.
  • It is designed for computers. It is in the binary language because the computer can understand only binary language.
  • The above question asked about the file which holds the special character and presented in the form of binary. This file is known as the ASCII file which is described above.
4 0
3 years ago
Your desktop, internet explorer, and the media player can be started from this area on most computers
Allisa [31]
The answer is quick launch
3 0
3 years ago
__________ refers to the coupling of data stored in files and the specific programs required to update and maintain those files
atroni [7]
I think it is good for the environment
7 0
4 years ago
When you respond to an e-mail message, a good skill to develop is ___________-editing, which involves inserting your responses t
Drupady [299]

Answer: Down editing

Explanation:

Down editing is a method of replying emails which allows you to respond point by point to an email. It add certainty, precision and quality to your response and helps prevent misunderstanding of email response.

7 0
3 years ago
Other questions:
  • Two technicians are discussing amperage in a series circuit. Technician A states that adding resistors in series will decrease c
    13·1 answer
  • Are there any tips or helpful advice for people who want to learn Photoshop?
    10·1 answer
  • You are connected to a server on the Internet and you click a link on the server and receive a time-out message. What layer coul
    12·1 answer
  • What do astronomers call a system that is composed of more than two stars?
    9·2 answers
  • What made it possible to develop personal computers?
    10·2 answers
  • Explain why it is wise to remember your social security number
    15·2 answers
  • Write a script that checks to see if at least one argument has been given on the command line and tests whether the argument is
    5·1 answer
  • Create a statement that always returns the names of the three criminals with the highest number of crimes committed.
    15·1 answer
  • What do you think color theory<br> in web design is?
    14·1 answer
  • In 2008, researchers at Princeton University demonstrated techniques to retrieve RAM contents after the computer had been powere
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!