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, 23.06.2019 00:30
Quick pl which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 24.06.2019 10:20
Multiple choice project create a program with two multiple choice questions. 1. users have two attempts only, show attempt number each time. hint: while loop with break control. (20%) 2. only one correct answer for each question, use switch case for each question. (20%) 3. show total score after the two questions are answered. hint: . (20%) 4. user have options to answer the two questions again if first attempt score is not 100%. hint: if statment. (20%) 5. use string method .toupper() to allow users to enter with lowercase or uppercase letters. (20%) 1. where is the capital of the state of florida? a. orlando b. tallahassee c. miami d. tampa b 2. where is walt disney world park located in florida? a. orlando b. tallahassee c. miami d. tampa a
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
Universal windows platform is designed for which windows 10 version?
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
Anew author is in the process of negotiating a contract for a new romance novel. the publisher is offering three options. in the first option, the author is paid $5,000 upon delivery of the final manuscript and $20,000 when the novel is published. in the second option, the author is paid 12.5% of the net price of the novel for each copy of the novel sold. in the third option, the author is paid 10% of the net price for the first 4,000 copies sold, and 14% of the net price for the copies sold over 4,000. the author has some idea about the number of copies that will be sold and would like to have an estimate of the royal- ties generated under each option. write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold. the program then outputs he royalties under each option and the best option the author could choose. (use appropriate named constants to store the special values such as royalty rates and fixed royalties.
Answers: 1
You know the right answer?
1| def saveUserProfile(firstName, lastName, age, height, country): 2| filename = lastName + firstNa...
Questions
question
Advanced Placement (AP), 03.09.2020 07:01
question
Arts, 03.09.2020 07:01
question
Mathematics, 03.09.2020 07:01
question
Mathematics, 03.09.2020 07:01
Questions on the website: 13722367