Question

Need help with output form -I need my variables and strings in my print function to...

Need help with output form

-I need my variables and strings in my print function to be separated by underscores _. Thanks.

m, d, y=eval(input("Enter the date like so m, d, y: "))
files=eval(input("How many files?: "))
fName=(input("Enter your family name: "))

FROM THIS: print(fName,m,d,y,".txt")

FORM OUTPUT NEEDS TO BE IN: name_month_day_year.txt

0 0
Add a comment Improve this question Transcribed image text
Answer #1
m, d, y = eval(input("Enter the date like so m, d, y: "))
files = eval(input("How many files?: "))
fName = (input("Enter your family name: "))

print(fName + "_" + str(m) + "_" + str(d) + "_" + str(y) + ".txt")

Add a comment
Know the answer?
Add Answer to:
Need help with output form -I need my variables and strings in my print function to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Objective: Use input/output files, strings, and command line arguments. Write a program that processes a text...

    Objective: Use input/output files, strings, and command line arguments. Write a program that processes a text file by removing all blank lines (including lines that only contain white spaces), all spaces/tabs before the beginning of the line, and all spaces/tabs at the end of the line. The file must be saved under a different name with all the lines numbered and a single blank line added at the end of the file. For example, if the input file is given...

  • For this code below, I need to add the form information to mysql when I click...

    For this code below, I need to add the form information to mysql when I click on submit, at the same time when I click on submit I need to move to another page like Welcome.php WITH NOTE THAT THE ENTERED INFORMATION NOW ALREADY IN DATABASE how can I male that with my code below? THANKS ................................................................................................................................................   <form method="POST"> <div class="container">    <label for="fname"><b>First Name</b></label> <input type="text" placeholder="Enter First Name" name="fname" required> <label for="lname"><b>Last Name</b></label> <input type="text" placeholder="Enter Last Name"...

  • I need help with this python programming exercise, please! thanks in advance Create a Python script...

    I need help with this python programming exercise, please! thanks in advance Create a Python script file called hw4.py. Add your name at the top as a comment, along with the class name and date. Both exercises should be in this file, with a comment before each of them to mark it. Ex. 1. Write a program that inputs an integer number from the user, then prints a letter "O" in ASCII art using a width of 5 and the...

  • Need help creating a customer order form using Netbeans (programming language is Java). I can design...

    Need help creating a customer order form using Netbeans (programming language is Java). I can design the form but need help with writing the codes. Use the below areas to input on the form Customer name Customer address Drink (tea, water etc) Sandwich (white, parmesan) Type (Italian, Turkey) Size (12" for $6) Provide screenshots to show output of the above elements. The output should prompt to enter customer name, address then the drink, sandwich and so on. The output should...

  • Question 1 The code used to output messages to the screen begins with run # print...

    Question 1 The code used to output messages to the screen begins with run # print output Flag this Question Question 2 The code used to begin a comment in the Python program source code is # Hello * Comment Flag this Question Question 3 A variable name is like a(n) input typed on a keyboard address in computer memory where values can be stored output to a computer screen value assigned to an address in computer memory Flag this...

  • Python Help Please! This is a problem that I have been stuck on.I am only suppose...

    Python Help Please! This is a problem that I have been stuck on.I am only suppose to use the basic python coding principles, including for loops, if statements, elif statements, lists, counters, functions, nested statements, .read, .write, while, local variables or global variables, etc. Thank you! I am using python 3.4.1. ***( The bottom photo is a continuation of the first one)**** Problem statement For this program, you are to design and implement text search engine, similar to the one...

  • Hey, I have an assignment from my Data Structures class. I need the output to be:...

    Hey, I have an assignment from my Data Structures class. I need the output to be: [1] to set the student name [2] to set the student address [3] to set the student GPA [4] to set the student student ID [5] to set the student major [6] to print student info [7] to exit Then I need this output to repeat another 2 times. How can I code that? Its java Also, to code the output above, I used...

  • Hello I need help fixing my C++ code. I need to display in the console the...

    Hello I need help fixing my C++ code. I need to display in the console the information saved in the file as well have the content saved in the file output in a fixed position like the screenshot. Thanks. CODE #include<iostream> #include<fstream> #include<iomanip> using namespace std; //main function int main() {    //variable to store student id    int id;       //variables to store old gpa(ogpa), old course credits(occ), new course credits(ncc), current gpa(cur_gpa), cumulative gpa(cum_gpa)    float ogpa,...

  • I need help please to add function for clean up any inputs form that we receive from the users for this code below : &lt...

    I need help please to add function for clean up any inputs form that we receive from the users for this code below : <?php session_start(); // initializing variables $fname = ""; $lname = ""; $address = ""; $city = ""; $state = ""; $zip = ""; $email = ""; $phone = ""; $errors = array(); // connect to the database $db = mysqli_connect("localhost","root","password","db"); // REGISTER USER if (isset($_POST['reg_user1'])) { // receive all input values from the form $fname =...

  • This assignment tests your ability to write C programs that handle keyboard input, formatted console output,...

    This assignment tests your ability to write C programs that handle keyboard input, formatted console output, and input/output with text files. The program also requires that you use ctype functions to deal with the logic. In this program, you will input from the user two characters, which should both be letters where the second letter > the first letter. You will then input a file character-by-character and output those letters that fall between the two characters (inclusively) to an output...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT