answer.
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
marta [7]
1 year ago
9

How can we make our programs behave differently each time they are run?

Computers and Technology
1 answer:
tensa zangetsu [6.8K]1 year ago
7 0

Answer:

By given the right speech as much as the answers must be

Explanation:

By given the right speech as much as the answers must be

You might be interested in
Which programming element is used by a game program to track and display score information?
lubasha [3.4K]
I think is Variablesss
7 0
2 years ago
Read 2 more answers
Write a program that uses the function isPalindrome given in Example 6-6 (Palindrome). Test your program on the following string
Artist 52 [7]

Answer:

#include <bits/stdc++.h>

using namespace std;

bool isPalindrome(string str)

{

   char a,b;

int length = str.length();

for (int i = 0; i < length / 2; i++)

{

   a=tolower(str[i]);//Converting both first characters to lowercase..

   b=tolower(str[length-1-i]);

   if (b != a )

return false;

}

return true;

   

}

int main() {

   string t1;

   cin>>t1;

   if(isPalindrome(t1))

   cout<<"The string is Palindrome"<<endl;

   else

   cout<<"The string is not Palindrome"<<endl;

return 0;

}

Output:-

Enter the string

madam

The string is Palindrome

Enter the string

abba

The string is Palindrome

Enter the string

22

The string is Palindrome

Enter the string

67876

The string is Palindrome

Enter the string

444244

The string is not Palindrome

Explanation:

To ignore the cases of uppercase and lower case i have converted every character to lowercase then checking each character.You can convert to uppercase also that will also work.

6 0
2 years ago
You and your friend who lives far away want to fairly and randomly select which of the two of you will travel to the other’s hom
Phantasy [73]

Answer:

c. your friend can hash all possible options and discover your secret.

Explanation:

SHA-256 is a set of hash functions that was designed by the NSA. SHA-2 is considered an upgrade on the set that was its predecessor, SHA-1. A hash is a mathematical function that condenses data in a process of one-way encryption. SHA-256 creates hash algoritms that are considered irreversible and unique. However, one of the properties of hashing algorithms is determinism, which means that any computer in the world would be able to compute a particular hash and get the same answer.

6 0
2 years ago
Write a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times
otez555 [7]

Answer:

The program written in python is as follows

def countchr(phrase, char):

     count = 0

     for i in range(len(phrase)):

           if phrase[i] == char:

                 count = count + 1

     return count

phrase = input("Enter a Phrase: ")

char = input("Enter a character: ")

print("Occurence: ",countchr(phrase,char))

Explanation:

To answer this question, I made use of function

This line defines function countchr

def countchr(phrase, char):

This line initializes count to 0

     count = 0

This line iterates through each character of input phrase

     for i in range(len(phrase)):

This line checks if current character equals input character

           if phrase[i] == char:

The count variable is incremented, if the above condition is true

                 count = count + 1

The total number of occurrence is returned using this line

     return count

The main method starts here; This line prompts user for phrase

phrase = input("Enter a Phrase: ")

This line prompts user for a character

char = input("Enter a character: ")

This line prints the number of occurrence of the input charcater in the input phrase

print("Occurence: ",countchr(phrase,char))

4 0
2 years ago
Every brand of computer has its own binary language, called
Kaylis [27]
Machine language.

Hope this helps
6 0
2 years ago
Other questions:
  • Which of these is an on-site metric for social media marketing?
    13·1 answer
  • Shaniya has misspelled a scientific name in her biology report. She needs to correct it, but she has no access to a computer. Sh
    13·2 answers
  • Imagine that you have configured the enable secret command, followed by the enable password command, from the console. You log o
    12·1 answer
  • CodeHS Python Rainforest Exercise 5.4.7: Categories
    12·1 answer
  • Discuss the importance of following a well-integrated change control process on IT projects. What consequences can result from n
    14·1 answer
  • E-mail is an efficient means of disseminating information quickly and inexpensively. However, HIPAA regulations affect e-mail us
    13·1 answer
  • 9.6 Code Practice: Question 1
    9·1 answer
  • Select the correct answer. Andy wants to become a multimedia producer. Which degree can help him achieve this goal? A. bachelor’
    5·1 answer
  • Write a complete Java program that: Prompts an employee to enter the number of hours that they have worked in a given week and s
    14·1 answer
  • Which XXX and YYY correctly output the smallest values? Vector user Vals contains integers (which may be positive or negative).
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!