Explanation:
10:A program that assigns the sum 20,30,40
20: input 20,30,40
30:sum input
40: print total
End
Write a program that asks the user to enter in a username and then examines that username to make sure it complies with the rules above. Here's a sample running of the program - note that you want to keep prompting the user until they supply you with a valid username:
user_in = input ("Please enter your username: " )
if user_in in "0123456789":
print ("Username cannot contain numbers")
elif user_in in "?":
print ("Username cannot continue special character")
else:
print (" Welcome to your ghetto, {0}! ".format(user_in))
what is the main difference between a computer program and computer software
Answer:
Think of computer software sort of as DNA, because DNA is the human body's computer software. And a computer program is like an activity your body does.
Explanation:
Sorry if this didn't help.
write a C++ program that receives a number as input from the user ,and checks whether it is greater than 8 and less than 10 or not and print the result
num_in = float (input = ("Please enter a number from 0 to ten: "))
def cmp_num(num_in):
try:
if num_in > 8 and num_in < 10:
print ("{0} is greater than 8 and less than 10".format(num_in) )
elif num_in < 8 and num_in < 10:
print (" {0} is less than 8 and less than 10".format(num_in) )
else:
print ("{0} is out of the restriction".format (num_in))
except ValueError:
print ("Invalid input")
The slope and intercept pair you found in Question 1.15 should be very similar to the values that you found in Question 1.7. Why were we able to minimize RMSE to find the same slope and intercept from the previous formulas? Write your answer here, replacing this text.
What’s cloud-based LinkedIn automation?
Answer:
Cloud based LinkedIn automation includes tools and software that run through the cloud-system and are not detectable by LinkedIn. Cloud based LinkedIn automation tools are becoming the favorite among B2B marketers and sales professionals as they are giving the desired outcomes without any effort.
Write equivalent predicate statement for Every teacher who is also a painter loves Bob
Answer:
Every teacher who is also a painter loves Bob
how did hitles rules in nazi germany exemplify totiltarian rule?
Answer:
hope this helps if not srry
Which Windows installation method requires that you manually rename computers after the installation?
Answer:
Command line
Explanation:
After installation of the machine one needs to manually rename the computer. This can be done through the start then settings, then system, and select rename the PC in the right-hand side column.The Lisp function LENGTH counts the number of elements in the top level of a list. Write a function ALL-LENGTH of one argument that counts the number of atoms that occur in a list at all levels. Thus, the following lists will have the following ALL-LENGTHs.
(A B C) => 3
((A (B C) D (E F)) => 6
(NIL NIL (NIL NIL) NIL ) => 5
Answer:
bc
Explanation:
The analog computer deals directly with
continuously variable aspects of physical phenomena such as a electrical, mechanical etc.
The analog computer deals directly with measured values of continuous physical magnitude.
What is an Analog computer?An analog computer may be defined as a type of computer that is significantly used to process analog data. These computers store data as a continuum of physical quantities and perform calculations using measurements.
It is completely different from digital computers, which use symbolic numbers to represent results. are great for situations that require data to be measured directly without conversion to numbers or codes. Analog computers, although readily available and used in scientific and industrial applications such as control systems and aircraft, have largely been superseded by digital computers due to the many complications involved.
Therefore, the analog computer deals directly with measured values of continuous physical magnitude.
To learn more about Analog computers, refer to the link:
https://brainly.com/question/18943642
#SPJ2
Your question seems incomplete. The most probable complete question is as follows:
The analog computer deals directly with:
number or codes.measured values of continuous physical magnitude.signals in the form of 0 or 1.signals in discrete values from 0 to 9Scenarios are quite common where an IT professional is tasked with modify a file on many computer systems or many files on a single computer or a combination of the two. For example, a large software may need the copyright notice comment to be changed on every source file in the project. Or, a configuration file may need to be modified on every server in a multi-server deployment. Doing this task manually is not a viable way to approach the problem. Instead, a better solution is to use a scriptable environment to perform search and replace functionality on the files in question. Python is an excellent tool for this kind of task.
Description
Samba is a unix/linux file sharing suite of programs designed to provide Windows interoperable file and print sharing services. Much of the configuration for the Samba daemon is provided by the text file smb.conf (renamed to smb.txt for this assignment). After an update was deployed to three dozen linux servers it was discovered that a couple of configured parameters were incorrect. Unfortunately, since there are unique aspects to each server, copying the contents of a single file to each server is not a viable solution. To fix the problem, the IT department must connect to each server, edit the smb.conf file, and restart the smbd daemon. To automate this task, each server will have a Python script copied to it. Then an SSH session will be initiated to each server from which the script will be executed. Your task is to write the Python script.
The invocation of the script must be as follows:
python modify.py fileSpec "from" "to"
where,
modify.py is the name of your script
fileSpec is the name of the file to be modified (smb.txt)
"from" is the text to be searched for (be sure to enclose any white space in quotes.
"to" is the text the searched text is to be replaced with.
Testing the script is your responsibility. However a good test case is:
python modify.py smb.txt "password sync = yes" "password sync = no"
Answer:
Explanation:/
The example Python script that can be used to automate the modification of the smb.conf file on multiple Linux servers is shown below
What is the code?python
import subprocess
import sys
def modify_smb_conf(file_spec, search_text, replace_text):
try:
# Open the file for reading
with open(file_spec, 'r') as file:
# Read the contents of the file
file_contents = file.read()
# Perform the search and replace operation
modified_contents = file_contents.replace(search_text, replace_text)
# Open the file for writing
with open(file_spec, 'w') as file:
# Write the modified contents back to the file
file.write(modified_contents)
# Print a success message
print(f"Modification successful: Replaced '{search_text}' with '{replace_text}' in {file_spec}")
except IOError as e:
# Print an error message if there was an issue with file operations
print(f"Error: {e}")
def main():
# Check if the correct number of command line arguments are provided
if len(sys.argv) != 4:
print("Usage: python modify.py fileSpec \"from\" \"to\"")
return
# Extract the command line arguments
file_spec = sys.argv[1]
search_text = sys.argv[2]
replace_text = sys.argv[3]
# Call the function to modify the smb.conf file
modify_smb_conf(file_spec, search_text, replace_text)
if __name__ == '__main__':
main()
Read more about code here:
https://brainly.com/question/29330362
#SPJ2
Cryptarithmetic algorithm
Answer:
CryptArithmetic or verbal arithmetic is a class of mathematical puzzles in which the digits are replaced by letters of the alphabet or other symbols. Usually it is required that each letter would be replaced by a unique digit. Each letter having different value from the other letters.
Explanation:
Cryptarithm now denotes mathematical problems usually calling for addition, subtraction, multiplication, or division and replacement of the digits by letters of the alphabet or some other symbols. ... Since D × B has only one digit, B must be 3 or less. The only two possibilities are 0 and 2.
Write a program that randomly chooses among three different colors for displaying text on the screen. Use a loop to display 20 lines of text, each with a randomly chosen color. The probabilities for each color are to be as follows: white 30%, blue 10%, green 60%. Suggestion: Generate a random integer between 0 and 9. If the resulting integer falls in the range 0 to 2 (inclusive), choose white. If the integer equals to 3, choose blue. If the integer falls in the range 4 to 9 (inclusive), choose green. Test your program by running it ten times, each time observing whether the distribution of line colors appears to match the required probabilities.
INCLUDE Irvine32.inc
.data
msgIntro byte "This is Your Name's fourth assembly extra credit program. Will randomly",0dh,0ah
byte "choose between three different colors for displaying twenty lines of text,",0dh,0ah
byte "each with a randomly chosen color. The color probabilities are as follows:",0dh,0ah
byte "White=30%,Blue=10%,Green=60%.",0dh,0ah,0
msgOutput byte "Text printed with one of 3 randomly chosen colors",0
.code
main PROC
;
//Intro Message
mov edx,OFFSET msgIntro ;intro message into edx
call WriteString ;display msgIntro
call Crlf ;endl
call WaitMsg ;pause message
call Clrscr ;clear screen
call Randomize ;seed the random number generator
mov edx, OFFSET msgOutput;line of text
mov ecx, 20 ;counter (lines of text)
L1:;//(Loop - Display Text 20 Times)
call setRanColor ;calls random color procedure
call SetTextColor ;calls the SetTextColor from library
call WriteString ;display line of text
call Crlf ;endl
loop L1
exit
main ENDP
;--
setRanColor PROC
;
; Selects a color with the following probabilities:
; White = 30%, Blue = 10%, Green = 60%.
; Receives: nothing
; Returns: EAX = color chosen
;--
mov eax, 10 ;range of random numbers (0-9)
call RandomRange ;EAX = Random Number
.IF eax >= 4 ;if number is 4-9 (60%)
mov eax, green ;set text green
.ELSEIF eax == 3 ;if number is 3 (10%)
mov eax, blue ;set text blue
.ELSE ;number is 0-2 (30%)
mov eax, white ;set text white
.ENDIF ;end statement
ret
setRanColor ENDP
mk chưa hiểu nên các bạn giúp mk vs
Answer:
my tab and state it all over my name to
In securing the client/server environment of an information system, a principal disadvantage of using a single level sign-on
password is the danger of creating a(n)
A
administrative bottleneck
B
trap door entry point
С
lock-out of valid users
D
Single point of failure
Answer:
C
Explanation:
What does the statement that follows do? double gallons[6] = { 12.75, 14.87 }; a. It assigns the two values in the initialization list to the first two elements but leaves the other elements with the values currently in memory. b. It assigns the two values in the initialization list to the first and second elements, third and fourth elements, and fifth and sixth elements. c. This statement is invalid. d. It assigns the two values in the initialization list to the first two elements and default values to the other elements.
Answer:
It assigns the two values in the initialization list to the first two elements and default values to the other elements.
Explanation:
Given
The array initialization
Required
Interpret the statement
double gallons[6] implies that the length/size of the array gallons is 6.
In other words, the array will hold 6 elements
{12.75, 14.87} implies that only the first two elements of the array are initialized ; the remain 4 elements will be set to default 0.
Why is it useful for students to practice the MLA and APA citation methods?
Answer:
Citing or documenting the sources used in your research serves three purposes:
It gives proper credit to the authors of the words or ideas that you incorporated into your paper.
It allows those who are reading your work to locate your sources, in order to learn more about the ideas that you include in your paper.
Write a program that reads in an integer, and breaks it into a sequence of individual digits. Display each digit on a separate line. For example, the input 16384 is displayed as 1 6 3 8 4 You may assume that the input has no more than five digits and is not negative.
Answer:
The program in Python is as follows:
num = int(input())
for i in str(num):
print(int(i))
Explanation:
This gets input for the number
num = int(input())
This converts the number to string and iterates through each element of the string
for i in str(num):
This prints individual digits
print(int(i))
Which of the given assertion methods will return true for the code given below? Student student1 = new Student(); Student student2 = new Student(); Student student3 = student1;
The Student class is as follows.
public class Student{
private String name;
}
a. assertEquals(student1, student2);
b. assertEquals(student1, student3);
c. assertSame(student 1, student3);
d. assertSame(student1, student2);
Answer:
The true statements are :
A. assertEquals(student1,student2)
C. assertSame(student1,student3)
Explanation:
AssertEquals() asserts that the objects are equal, but assertSame() asserts that the passed two objects refer to the same object or not, if found same they return true, else return false.
Methods are collections of named code segments that are executed when evoked
The assertion method that will return true for the given code is: assertEquals(student1,student2)
The code segment is given as:
Student student1 = new Student();
Student student2 = new Student();
Student student3 = student1;
In Java, the assertEquals() method returns true if two objects have equal values.
Assume student1 and student2 have equal values, the statement assertEquals(student1,student2) will return true
Read more about java methods at:
https://brainly.com/question/15969952
when was first generation of computer invented?
By Using the following schema, answer the following SQL queries and commands: Product(P_code.P_name, P_price, P_on_hand,vend_code) Vender(vend_code, vend_fname, vend_areacode, vend_phone) 1- find the venders names who sell products in TN-5 area and their names include "dan". 2- find the code, name and vender code of product that has price between 1500S and 2500S and the product that has price between 48005 and 5600S. 3- Find the name, and code of venders who had 5 microwaves that has price less than 3500S. 4- Find the phone numbers of venders who sell Televisions. 5- Delete the records of venders who their first name is 'smith'
Explanation:
answer me pls i need sol bbbd
Which of the following are advantages of a local area network, as opposed to a wide area network? Select 3 options.
provides access to more networks
higher speeds
more secure
lower cost
greater geographic reach
Answer:
✅ more secure
✅ lower cost
✅ higher speeds
Explanation:
Edge 2022
What are computer programs that make it easy to use and benefit from techniques and to faithfully follow the guidelines of the overall development methodology
Answer:
A Tool
Explanation:
Tools are computer programs that make it simple to use and benefit from techniques while adhering to the overall development methodology's guidelines. The correct option is A).
What are computer programs?A computer-aided software development case tool is a piece of software that aids in the design and development of information systems. It can be used to document a database structure and provide invaluable assistance in maintaining design consistency.
A computer software application is one that is developed to assist a particular organizational function or process, such as payroll systems, market analysis, and inventory control.
The goal of introducing case tools is to reduce the time and cost of software development, while also improving the quality of the systems created.
Therefore, the correct option is A) Tools.
To learn more about computer programs, refer to the below link:
https://brainly.com/question/9963733
#SPJ2
The question is incomplete. Your most probably complete question is given below:
A) Tools
B) Techniques
C) Data flow
D) Methodologies
Describe two types of storage devices?
Answer:
Central Process Unit and Random Access Memory
Differentiate between email and NIPOST System
Answer: NIPOST System is sending mail physical like photos and letters and many items
Email is electronic mail sent through the internet but you can send it anywhere
Explanation:
Code Example 4-1 int limit = 0; for (int i = 10; i >= limit; i -= 2) { for (int j = i; j <= 1; ++j) { cout << "In inner for loop" << endl; } cout << "In outer for loop" << endl; } (Refer to Code Example 4-1.) How many times does "In inner for loop" print to the console? a. 1 b. 0 c. 2 d. 5 e. 7
Answer:
"In inner for loop" is printed twice.
Answer: C. 2
Explanation:
Code:
int main()
{
int limit = 0;
for (int i =0; i>=limit; i-=2) {
for (int j = i; j <= 1; ++j){
cout << "In inner for loop" << endl;
}
cout << "In outer for loop" << endl;
}
return 0;
}
Output:
In inner for loop
In inner for loop
In outer for loop
The output "In inner for loop" print twice.
Thus, option (c) is correct.
In the given code example, the inner for loop has a condition j <= 1.
This condition means that the loop will execute as long as j is less than or equal to 1.
However, the initial value of j is i, and the value of i decreases by 2 in each iteration of the outer for loop.
When i = 8, the inner loop has the condition j ≤ 1.
The loop will iterate as long as j is less than or equal to 1.
So the inner loop executes twice: once when j = 8, and then when j = 9. The statement "In inner for loop" prints twice.
Therefore, the output print twice.
Thus, option (c) is correct.
Learn more about Output problem here:
https://brainly.com/question/33184382
#SPJ4
10. Which property is used to show the form in maximize state
a) Selection State b) Window State c) Mode d) Opening State
Answer:
windows state
Explanation:
the answer is windows state.
Which one is the result of the ouWhen you move a file to the Recycle Bin, it will be immediately deleted from your computer.
A. True
B. Fals
Answer:
B => false
Explanation:
it just keep it on recycle bin => not being removed
Which is not a MARKETING impact of technology?
Social
Cultural
Economic
Environmental
Answer:
the answer is environmental
5. Which events is used to code on any form load
a) Form Text b) Form Code c) Form Load d) Form Data
Answer:
I think b is correct answer