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
Nitella [24]
3 years ago
12

Write a function called convert_format which converts the format of a date from mm/dd/yyyy to month name dd, yyyy.

Computers and Technology
1 answer:
My name is Ann [436]3 years ago
7 0

Answer:

The code is given using Python

Explanation:

#datetime to be import

from datetime import datetime

#function convert_format to convert_format date to particular format

def convert_format():

#take date from user input

inputDate = input('Enter a date(mm/dd/yyyy): ')

#using datetime convert to format month day year

dateObject = datetime.strptime(inputDate, '%m/%d/%Y')

#print the date

print(dateObject.strftime('%B %d, %Y'))

#function call

convert_format()

You might be interested in
Why is my speedtest is very good but chrome is slow
olga55 [171]
Maybe you have lots of tabs open
5 0
2 years ago
What does lurch mean
o-na [289]

Answer:

lurch means make an abrupt, unsteady, uncontrolled movement or series of movements; stagger.

7 0
3 years ago
Read 2 more answers
What best compares potrait and landscape orientations
REY [17]
In portrait  the height is taller than its wide and in landscape the height is smaller than wide
so its the wider and taller
5 0
3 years ago
5.17 (Calculating Sales) An online retailer sells five products whose retail prices are as follows: Product 1, $2.98; product 2,
Dima020 [189]

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

   

    //Initialize the prices as constants

    final double PRODUCT_1_PRICE = 2.98;

    final double PRODUCT_2_PRICE = 4.50;

    final double PRODUCT_3_PRICE = 9.98;

    final double PRODUCT_4_PRICE = 4.49;

    final double PRODUCT_5_PRICE = 6.87;

   

    //Declare the other variables

    int productNumber, quantitySold;

    double total = 0.0;

   

    //Create a Scanner object to get input

    Scanner input = new Scanner(System.in);

   

    //Create a while loop

    while(true){

        //Ask the user to enter the productNumber

     System.out.print("Enter the product number or 999 to quit: ");

     productNumber = input.nextInt();

     

     // Stop the loop, if productNumber is 999(sentinel value, you may choose any value you want)

     if(productNumber == 999)

         break;

     

     //Ask the user to enter the quantitySold

     System.out.print("Enter the quantity sold: ");

     quantitySold = input.nextInt();

     

     //Create a switch statement that works depending on the productNumber entered.

     //For example, if the productNumber is 1, it multiplies the quantitySold by PRODUCT_1_PRICE

     //   and adds the result to the total. If productNumber is 2, it does the same for product 2 ...

     switch(productNumber){

         case 1:

             total += quantitySold * PRODUCT_1_PRICE;

             break;

         case 2:

             total += quantitySold * PRODUCT_2_PRICE;

             break;

         case 3:

             total += quantitySold * PRODUCT_3_PRICE;

             break;

         case 4:

             total += quantitySold * PRODUCT_4_PRICE;

             break;

         case 5:

             total += quantitySold * PRODUCT_5_PRICE;

             break;

     }

    }

 

 //Print the total (when the loop is done)

 System.out.println("The total is $" + total);

}

}

Explanation:

*The code is in Java.

You may see the explanation as comments in the code.

4 0
3 years ago
To convince the server that a user is authentic, the authentication server creates a _________ that contains the user's ID and n
Rasek [7]

Answer: ticket

Explanation

6 0
3 years ago
Other questions:
  • The concept of ____ refers to the idea that the internet is designed for all content to be treated equally.
    12·1 answer
  • A modern information-processing model that views memories as emerging from particular activation patterns within neural networks
    6·1 answer
  • On other questions, how do I write my own question, without commenting on others questions? It is only allowed two, I think, the
    13·1 answer
  • You can use RWA to demonstrate how to do something special on the web, such as displaying articles found on websites that suppor
    15·1 answer
  • 1. Given a sequential list with n numbers, represented in a one-dimensional array A) Write an algorithm to check if the list has
    14·1 answer
  • This assignment requires you to write a program to analyze a web page HTML file. Your program will read one character at a time
    13·1 answer
  • What games do you play?<br><br><br> Be sure not to report any answers!
    5·1 answer
  • Ania has written this SimpleStopwatch class. In which line is she measuring the elapsed time?
    13·1 answer
  • Write a format operation that builds a string for the float variable amount that
    11·1 answer
  • The unit we use to measure bending moment is...<br> A kg<br> B N<br> C Nm<br> D MPa
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!