subject

1| def saveUserProfile(firstName, lastName, age, height, country): 2| filename = lastName + firstName + ".txt"
3| outputFile = open(filename, "w")
4| print(lastName, file = outputFile)
5| print(firstName, file = outputFile)
6| print(country, file = outputFile)
7| print(height, file = outputFile)
8| print(age, file = outputFile)
9| outputFile. close()
Above is a function that takes five pieces of information about a user and saves that data to a file. We'll assume firstName, lastName, and country are strings, age is an integer, and height (expressed in meters) is a float.

Assume we call the function above with this line of code:

saveUserProfile("David", "Joyner", 30, 1.8, "USA")
After the function runs, what is name of the file that is created?

a. What is written on line 1 of that file? If there is no line 1 or if line 1 is blank, enter Nothing.
b. What is written on line 2 of that file? If there is no line 2 or if line 2 is blank, enter Nothing.
c. What is written on line 3 of that file? If there is no line 3 or if line 3 is blank, enter Nothing.
d. What is written on line 4 of that file? If there is no line 4 or if line 4 is blank, enter Nothing.
e. What is written on line 5 of that file? If there is no line 5 or if line 5 is blank, enter Nothing.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:40
Consider the simple 3-station assembly line illustrated below, where the 2 machines at station 1 are parallel, i.e., the product only needs to go through one of the 2 machines before proceeding to station 2.what is the throughput time of this process?
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
You know the right answer?
1| def saveUserProfile(firstName, lastName, age, height, country): 2| filename = lastName + firstNa...
Questions
question
Mathematics, 05.11.2020 01:40
question
Mathematics, 05.11.2020 01:40
question
Mathematics, 05.11.2020 01:40
question
Mathematics, 05.11.2020 01:40
question
World Languages, 05.11.2020 01:40