Answer:
def encrypt_text(text,value):
encoded = ""
for i in range(len(text)):
char = text[i]
if (char.isupper()):
encoded += chr"po"ord'po'char'pc' + value -65'pc' % 26 + 65'pc'
else:
encoded += chr'po'ord'po'char'pc' + value -97'pc' % 26 + 97'pc'
return encoded
plaintext = input("Enter sentence of encrypt: ")
dist_value = int(input("Enter number: "))
encrypted = encrypt_text(plaintext, dist_value)
print(encrypted)
Explanation:
The python program above is a Ceasar cipher implementation. The encrypt_text function is defined to accept text input and a distance value, which is used to encrypt the plaintext.
The user can directly input text and the distance value from the prompt and get the encrypted text printed on the screen.
#include <stdio.h>
int main(void) {
int givenYear;
givenYear = 1776;
if(givenYear >= 2100){
printf("Distant future");
}
else if (givenYear >= 2001){
printf("21st century");
}
else if (givenYear >= 1900){
printf("20th century");
}
else {
printf("Long ago");
}
return 0;
}
Search engines are programs that search for and identify items based on a user input keyword, phrase, etc. Examples include google, bing, etc.
Answer:
I would want my blinking pattern to be red first, followed by green, yellow, orange, white, purple, and cyan.
Explanation:
It would work just fine. It would be harder to read if there are images, but it would still work.