Write a program that asks the user to enter a date in MM/DD/YYYY format that is typical for the US, the Philippines, Palau, Canada, and Micronesia. For the convenience of users from other nations, the program computes and displays this date in an alternative DD.MM.YYYY format. Sample run of your program would look like this: Please enter date in MM/DD/YYYY format: 7/4/1776 Here is the formatted date: 04.07.1776 You can assume that the user will enter correctly formatted date, but do not count on having 0s in front of one-digit dates. Hint: you will need to use string addition (concatenation) here.
Answer:
In Python:
txt = input("Date in MM/DD/YYYY format: ")
x = txt.split("/")
date=x[1]+"."
if(int(x[1])<10):
if not(x[1][0]=="0"):
date="0"+x[1]+"."
else:
date=x[1]+"."
if(int(x[0])<10):
if not(x[0][0]=="0"):
date+="0"+x[0]+"."+x[2]
else:
date+=x[0]+"."+x[2]
else:
date+=x[0]+"."+x[2]
print(date)
Explanation:
From the question, we understand that the input is in MM/DD/YYYY format and the output is in DD/MM/YYYY format/
The program explanation is as follows:
This prompts the user for date in MM/DD/YYYY format
txt = input("Date in MM/DD/YYYY format: ")
This splits the texts into units (MM, DD and YYYY)
x = txt.split("/")
This calculates the DD of the output
date=x[1]+"."
This checks if the DD is less than 10 (i..e 1 or 01 to 9 or 09)
if(int(x[1])<10):
If true, this checks if the first digit of DD is not 0.
if not(x[1][0]=="0"):
If true, the prefix 0 is added to DD
date="0"+x[1]+"."
else:
If otherwise, no 0 is added to DD
date=x[1]+"."
This checks if the MM is less than 10 (i..e 1 or 01 to 9 or 09)
if(int(x[0])<10):
If true, this checks if the first digit of MM is not 0.
if not(x[0][0]=="0"):
If true, the prefix 0 is added to MM and the full date is generated
date+="0"+x[0]+"."+x[2]
else:
If otherwise, no 0 is added to MM and the full date is generated
date+=x[0]+"."+x[2]
else:
If MM is greater than 10, no operation is carried out before the date is generated
date+=x[0]+"."+x[2]
This prints the new date
print(date)
3/4+7=
what is the answer
Answer:
7 3/4
Explanation:
3
4
+ 7
= (0 + 7) + (
3
4
+ 0 )
= 7 +
3
4
+ 0 × 4
= 7 +
3
4
+
0
4
= 7 +
3 + 0
4
= 7 +
3
4
=
7 3
4
Suppose you present a project and your supervisor comments that the graphics need to be a higher quality and suggests you replace a circuit board. To what circuit board is your supervisor referring?
graphics card
video card
sound card
system card
Answer:graphics card
Explanation:
Answer:
graphics card
Explanation:
In Linux, users are internally represented using a unique number called user ID or uid.
a. True
b. False
Answer:
a. True
Explanation:
An operating system is a system software pre-installed on a computing device to manage or control software application, computer hardware and user processes.
This ultimately implies that, an operating system acts as an interface or intermediary between the computer end user and the hardware portion of the computer system (computer hardware) in the processing and execution of instructions.
Some examples of an operating system on computers are QNX, Linux, OpenVMS, MacOS, Microsoft windows, IBM, Solaris, VM etc.
In Linux, users are internally represented using a unique number called user ID or UID. Thus, this unique number serves as an internal identifier in the Linux Kernel and as such determines what system resources may be accessible to each user. Oftentimes, these unique numbers are not put into use but rather a name is linked with the number and are used instead.
Also, users can be organized logically into a group and are represented uniquely with a group ID or GID, which serves as a global identifier for the users.
The components of hardware include:
A) Monitor, CPU, Disk Drives, Printer, Keyboard/Mouse
B) Monitor, CPU, Disk Drives, Touch Screen, Keyboard/Mouse
C) Monitor, CPU, Software, Printer, Keyboard/Mouse
D) None of the above
Answer:
A
Explanation:
Monitor, CPU, Disk Drives, Printer, Keyboard/mouse
Answer:
B.monitor,cpu,disk drives,touch screen,keyboard/Mouse
When you use a rest area, you should:
A. Make sure your windows are closed tightly
B. Stop in a dark place where you can sleep
C. Walk around your car after resting
D. Sleep with the windows rolled down
Consider the security of a mobile device you use
(a) Explain how transitive trust applies to your use of an operating system on a
mobile device (e.g. smartphone). Then, explain how an attacker can exploit this
transitive trust to violate the CIA properties of the software and data on your
device
Answer:
keep it private
Explanation:
starting a computer or computer embedded devices is called
Answer:
Booting
Explanation:
starting a computer is called booting. In addition restarting is known as rebooting.
What is open source software?
Answer:
Open source software is free, modifiable, and is able to be redistributed. It is beneficial to those wanting to customize the software to suit their purposes as it can be easily shared and redistributed.
Given the following table of students, assignments, and grades for a single class:
Student_ID
Student_Name
Assignment_1_Date
Assignment_1_Name
Assignment_1_Grade
Assignment_2_Date
Assignment_2_Name
Assignment_2_Grade
Assignment_3_Date
Assignment_3_Name
Assignment_3_Grade
1011
Susan J. Smith
2015-06-01
Homework - Chapter Seven
76
2015-06-05
Chapter 7 Quiz
88
2015-06-12
Homework – Chapter 8
A
2332
Jones, Jamal K.
2015-06-01
Homework - Chapter Seven
84
2015-06-05
Quiz – Chapter 7
89
2015-06-12
Homework – Chapter 8
95
3432
Brown, Ronald
2015-06-01
Homework - Chapter Seven
66
2015-06-05
Quiz – Chapter 7
78
2015-06-12
Homework – Chapter 8
B
5435
Killen, Katie
2015-06-01
Homework - Chapter Seven
97
2015-06-05
Chapter 7 – Quiz
95
2015-06-12
Homework – Chapter 8
94
7574
Powell, B.
2015-06-01
Homework - Chapter Seven
68
2015-06-05
Quiz – Chapter 7
89
9677
Pat Hayes
6/1/2015
Homework - Chapter Seven
89
2015-06-05
Quiz – Chapter 7
85
2015-06-12
Homework – Chapter 8
99
Examine the data in the table above and identify any columns that contain data inconsistencies. Place an X in the Consistent or Inconsistent column.
Answer:
i need more
Explanation:
i need more
Write a print statement that uses an f-string to output $5,242.83
Answer:
print("${:,.2f}".format(5242.83))
Explanation:
Given
$5,242.83
Required
Use an f string to output the above
The syntax of an f-string to format a number in that regard is: "${:,.2f}".format(number)
$ means that a dollar sign be printed before the required number
., means that the number be separated with commas
2f means that the number be presented in 2 decimal places
So:
"${:,.2f}".format(number) becomes
"${:,.2f}".format(5242.83)
In a print statement, the full instruction is:
print("${:,.2f}".format(5242.83))
Select the correct answer from each drop-down menu.
translate the entire program source code at once to produce object code, so a program written in
runs faster than an equivalent program written in
Answer:
A compiler translates a program written in a high level language
A compiler translate the entire program source code at once to produce object code, so a program written in low-level language runs faster than an equivalent program written in high-level language.
What is a compiler?A compiler can be defined as a software program that is designed and developed to translate the entire source code of program at once, so as to produce object code, especially a software program that is written in a high-level language into low-level language (machine language).
In conclusion, we can deduce that a compiler translate the entire program source code at once to produce object code, so a program written in low-level language runs faster than an equivalent program written in high-level language.
Read more on software here: brainly.com/question/26324021
#SPJ2
5.18 LAB: Output numbers in reverse Write a program that reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicating the number of integers that follow. For coding simplicity, follow each output integer by a comma, including the last one. Ex: If the input is: 5 2 4 6 8 10 the output is: 10,8,6,4,2, To achieve the above, first read the integers into a vector. Then output the vector in reverse.
Answer:
In C++:
#include<iostream>
#include<vector>
using namespace std;
int main(){
int len, num;
vector<int> vect;
cout<<"Length: ";
cin>>len;
for(int i = 0; i<len;i++){
cin>>num;
vect.push_back(num);}
vector<int>::iterator iter;
for (iter = vect.end() - 1; iter >= vect.begin(); iter--){
cout << *iter << ", ";}
}
Explanation:
This declares the length of vector and input number as integer
int len, num;
This declares an integer vector
vector<int> vect;
This prompts the user for length
cout<<"Length: ";
This gets the input for length
cin>>len;
The following iteration gets input into the vector
for(int i = 0; i<len;i++){
cin>>num;
vect.push_back(num);}
This declares an iterator for the vector
vector<int>::iterator iter;
The following iterates from the end to the beginning and prints the vector in reverse
for (iter = vect.end() - 1; iter >= vect.begin(); iter--){
cout << *iter << ", ";}
Your friend really likes talking about owls. Write a function owl_count that takes a block of text and counts how many words they say have word “owl” in them. Any word with “owl” in it should count, so “owls,” “owlette,” and “howl” should all count.
Here’s what an example run of your program might look like:
text = "I really like owls. Did you know that an owl's eyes are more than twice as big as the eyes of other birds of comparable weight? And that when an owl partially closes its eyes during the day, it is just blocking out light? Sometimes I wish I could be an owl."
owl_count(text)
# => 4
Hints
You will need to use the split method!
Here is what I have so far, it doesn not like count = 0 and i keep getting an error.
def owl_count(text):
count = 0
word = 'owl'
text = text.lower()
owlist = list(text.split())
count = text.count(word)
text = "I really like owls. Did you know that an owl's eyes are more than twice as big as the eyes of other birds of comparable weight? And that when an owl partially closes its eyes during the day, it is just blocking out light? Sometimes I wish I could be an owl."
print (count)
In this exercise we have to use the knowledge of computational language in python, so we find the code like:
The code can be found attached.
So let's write a code that will be a recognition function, like this:
def owl_count(text):"I really like owls. Did you know that an owls eyes are more than twice as big as the eyes of other birds of comparable weight?"
word = "owl"
texts = text.lower()
owlist = list(texts.split())
count = text.count(word)
num = [owlist, count] #num has no meaning just random var
print(num)
See more about python at brainly.com/question/26104476
Which image-editing tool can be used to help remove spots and other marks from an image?
A. brighten
B. stylize
C. healing brush
D. contrast
E. desaturate
Answer:
c. healing brush
Explanation:
Combination of one or more columns used to identify particular rows in a relation is a (n)
Answer:
Combination of one or more columns used to identify particular rows in a relation is a key
A key is a combination of one or more columns that is used to identify particular rows in a relation.
KEYS in DBMS (database management system) is an attribute or set of attributes which helps you to identify a row in a relation(table). They allow you to find the relation between two tables.
Keys help you uniquely identify a row in a table by a combination of one or more columns in that table. Key is also helpful for finding unique record or row from the table.
Database key is also helpful for finding unique record or row from the table.
Find out more on DBMS at: https://brainly.in/question/1919695
Which of the following algorithms is the same as the flowchart shown below?
Start
mylum - RANDOM(1,10)
false
DISPLAY("Done
DISPLAY()
O Amylum - RANDOM (1, 19)
IF (byllum > 8)
(
DISPLAY("Done")
ELSE
(
DISPLAY(myNum)
}
OB. myllum - RANDOM(1, 18)
REPEAT UNTIL (byllum > 8)
{
DISPLAY(myNum)
myllum - RANDOM(1,18)
}
DISPLAY("Done")
Octylum - RANDOM(1, 18)
IF (myllum < 8)
{
DISPLAY("Done")
ELSE
{
DISPLAY(myllum)
)
O D. myllum - RANDOM(1, 18)
REPEAT UNTIL (myNun > 8)
{
DISPLAY("Done")
DISPLAY(byllum)
Answer:
choice b
Explanation:
The algorithms are the same as the flowchart shown below is myllum - RANDOM(1, 18), REPEAT UNTIL (byllum > 8) { DISPLAY(myNum)myllum - RANDOM(1,18)} DISPLAY("Done"). The correct option is B.
What is an algorithm?The definition of algorithms in computer science. An algorithm is a list of instructions used in computer science to solve problems or carry out activities based on knowledge of potential solutions.
Think of a "black box," or a container where nobody can see what is occurring within. The box accepts our input and produces the output we require, but the process by which input is transformed into the intended output—and which we may need to understand—is an ALGORITHM.
Therefore, the correct option is B. myllum - RANDOM(1, 18)REPEAT UNTIL (byllum > 8){DISPLAY(myNum)myllum - RANDOM(1,18)}DISPLAY("Done").
To learn more about an algorithm, refer to the link:
https://brainly.com/question/22984934
#SPJ5
2. BIOS is contained in ROM and not in RAM. Can you guess why?
Answer:
Because RAM is only used for short term storage (and doesn't contain anything that will need to be accessed often) RAM it loses its contents when turned off. So when you power on a computer, it has to start running bootup code which has to be stored in ROM
Save an image as a separate file by right-clicking the image and then clicking this option at the
shortcut menu
A) Save page as
B) Save Picture as
C) Save Image as
D) None of the above
Answer:
Save image as
Explanation:
Do you think it's easier to be mean online than offline? why?
Answer:
Yes because on online we can talk all we want and they don't know us irl so it's funny lol
Explanation:
What are the three types of networks?
A) Internet, PowerPoint, Excel
B) Internet, LAD, WAN
C) Internet, WAN, LAN
D) None of the above
Answer:
Local Area Network (LAN)
Metropolitan Area Network (MAN)
Wide area network (WAN)
(So C, I'm pretty sure.)
Answer:
LAN,MAN,WANExplanation:
are the three types of networkWrite your own printArray() function found in Processing for the Arduino. For simplicity, you can limit printArray() to integer arrays and you will also pass the size of the array to your function. For example, given the following code:
int terps[5] = {7, 9, 12, 1, 46};
void printArray(int arrayToPrint[], int arraySize) { // YOUR CODE HERE }
void setup()
{ // put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
printArray(terps,sizeof(terps)/sizeof(int)); delay(1000);
}
You should repeatedly see the following in the serial monitor:
[0]: 7
[1]: 9
[2]: 12
[3]: 1
[4]: 46
Answer:
Follows are the method definition to this question:
void printArray(int arrayToPrint[], int arraySize) //defining a method printArray that accepts two array in its parameters
{
for (int j = 0; j < arraySize; j++)//defining for loop print Serial numbers
{
Serial.print("[");//use print method to print square bracket
Serial.print(j);//use print method to print Serial numbers
Serial.print("]: ");//use print method to print square bracket
Serial.println(arrayToPrint[j]);//printing array value
}
}
Explanation:
In the above code, a method "printArray" is declared that holds two arrays "arrayToPrint and arraySize" as a parameter, and inside the method is used for loop to print the values.
In the loop, first, it uses the square bracket to print the serial number and in the last step, it prints array values.
lower cabinet is suitable for storing and stocking pots and pans true or false
it is an electronic device that capable of accessing accepting processing product and storing data
"A computer is an electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program." "A computer is an electronic device that manipulates information, or data. It has the ability to store, retrieve, and process data."
Q3: Create a class called Employee that includes three instance variables—a first name (typeString), a last name (type String) and a monthly salary (double). Provide a constructor that initializesthe three instance variables. Provide a set and a get method for each instance variable. If the monthly salary is not positive, do not set its value. {Do not write a full program, only a class}
Answer:
Follows are the code to the given question:
public class Employee //defining a class Employee
{
String first_name,last_name;
Double monthly_salary;
Employee(String first_name,String last_name,Double monthly_salary)
{
this first_name=f_name// initialize value in first_name
this last_name = l_name; // initialize value in the last_name
this monthly_salary = m_salary; // initialize value in the monthly_salary
if (monthly_salary < 0.0)//use if to check monthly_salary is positive
monthly_salary = 0.0;//set value 0
}
void setfirst_name (String f_name)//defining set method to store first_name
{
first_name = f_name; //holding the value of first_name
}
public String getfirst_name ()//defining get method to return first_name
{
return first_name;//return first_name
}
public void setlast_name (String l_name)//defining set method to store last_name
{
last_name = l_name; // holding the value of the last_name
}
public String getlast_name ()//defining get method to return last_name
{
return last_name;//return last_name
}
public void setmonthly_salary(double m_salary)//defining set method to store monthly_salary
{
monthly_salary = m_salary; // holding the value of the monthly_salary
}
public double getmonthly_salary ()//defining get method to return monthly_salary
{
return monthly_salary;//return monthly_salary
}
}
Explanation:
In this code, a class "Employee" is declared that defines two string variables "first_name,last_name", and one double variable "monthly_salary". In the next step, a parameterized constructor is defined that stores the value into the variable, and use if block to check "monthly_salary" is a positive. It also uses the getter and setter method to hold and return its value.
1. It is a set of integrated devices that input, output,
process, and store data and information.
a. Computer hardware
b. Computer software
c. Computer system
d. Computer program
A set of integrated devices that input, output, process, and store data and information is called: C. Computer system.
What is a computer system?A computer system can be defined as an electronic device that is designed and developed to receive data in its raw form as input and processes these data into an output (information) that could be used by an end user.
The components of a computer.Basically, the components of a computer system are classified as follows:
MotherboardCentral processing unit (CPU)Output InputRead more on computer system here: brainly.com/question/959479
Add (11011)2 + (111)2
Answer:
(11011)2+(111)2=(100010)2
hope it helps.
Answer:
(100010)square is the correct answer Hope it helps you have a great day keep smiling be happy stay safe ☺
2. On the line below, create a bulleted list, using the square bullet option, of the following parks
and recreational areas in the United States: Blue Ridge Parkway, Golden Gate National
Recreation Area, Great Smoky Mountain National Park, Gateway National Recreation Area, and
Lincoln Memorial.
Answer:
Blue Ridge Parkway Golden Gate National Recreation AreaGreat Smoky Mountain National Park Gateway National Recreation Area Lincoln Memorial.
Explanation:
teehee
Answer:
Blue Ridge Parkway
Golden Gate National Recreation Area
Great Smoky Mountain National Park
Gateway National Recreation Area
Lincoln Memorial.
Explanation:
Can someone tell me how to get rid of the the orange with blue and orange on the status bar
Please and thank you
Picture above
Answer:
Explanation:
i'm not sure how tho
Difference between a port and a connector
Explanation:
A connector is the unique end of a plug, jack, or the edge of a card that connects into a port. Port: The port has either holes or a slot that matches the plug or card being connected into the port. For example: cables are plugged into Ethernet ports, and cables and flash drives are plugged into USB ports.