Answer:
see explaination
Explanation:
The following code is in python 3.5 and above:
# Create a main method
def main():
# Accept name from the user
name = input("Enter your name: ")
# Accept describe yourself from the user.
describe = input("Describe yourself: ")
# Create a file object
f = open('person.html','w')
# Creat a string to store the html script.
message = """<html>
<head>
</head>
<body>
<center>
<h1>"""+name+"""</h1>
</center>
<hr/>"""+describe+"""<hr/>
</body>
</html>"""
f.write(message)
f.close()
main()
Answer:
Given
The above lines of code
Required
Rearrange.
The code is re-arrange d as follows;.
#include<iostream>
int main()
{
int userNum;
scanf("%d", &userNum);
if (userNum > 0)
{
printf("Positive.\n");
}
else
{
printf("Non-positive, converting to 1.\n");
userNum = 1;
printf("Final: %d\n", userNum);
}
return 0;
}
When rearranging lines of codes. one has to be mindful of the programming language, the syntax of the language and control structures in the code;
One should take note of the variable declarations and usage
See attachment for .cpp file
Answer:
Explanation:
print(list1)
['C++', 'JAVA', 'ASP.PHP']
[2:-2]
Gets 2 position(C++) to -2 position(ASP.PHP), JAVA is in the Middle
print(list2)
[]
Gets middle of C++(nothing)
print(list3)
['Python', 'JAVA', 'MySQL']
Get first, jump 3, get first...
'get', 'any', 'any', 'get', 'any', 'any', 'get', ...
Answer:
A workstation used at an engineering firm is characteristic of an enterprise environment.
Answer:
Algorithms is formula for solving a problem. It is helpful because it specifically give instructions detail to computer to what a computer should perform a specific task.
For e.g. calculating report cards.