subject

We have established contact with aliens! write a script that asks for a block of text and determines whether the text is written in the "alien language" based on these rules: a) all alien words are palindromes (they are the same forward and backward, like "glolg" or "tacocat"), can be capitalized in any way (like "gfraarfg" or "vobov"), and only use alphabetical letters ("tre3ert" is not an alien word). b) alien numbers are not always palindromes, but they always start with one or more zeroes (like "0123", "0033300", or "007"), and they never use negative numbers or floating point numbers ("0123.4" or "-042" are not alien numbers). c) aliens use limited punctuation, only commas (","), periods ("."), and question marks ("? ") are allowed, and they are only ever used at the end of a word ("gog brarb, vaav? wiwiw" is in the alien language, but "obo , drard ? mam" is not).if all the parts of the text are either alien words or alien numbers and have alien punctuation (ie, the text is of the alien language), then print 'true'; otherwise, print 'false'.hint: write a function (or multiple functions! ) that takes in a string and determines whether it is punctuated correctly, and then whether it is either an alien word or an alien number. sample input 1: glolg braahaarb mom hhhsample output 1: truesample input 2: jlumulj ? brrb gruurg 003323? sample output 2: falsesample input 3: i gtg, brb lol! sample output 3: falsesample input 4: fraaarf, xadmdax krunnurk 0064.sample output 4: truesample input 5: luughguul 8008 mmumm. sample output 5: falsesample input 6: 008boo 002 otto? sample output 6: false

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 22:40, nsuleban9524
When you type the pwd command, you notice that your current location on the linux filesystem is the /usr/local directory. answer the following questions, assuming that your current directory is /usr/local for each question. a. which command could you use to change to the /usr directory using an absolute pathname? b. which command could you use to change to the /usr directory using a relative pathname? c. which command could you use to change to the /usr/local/share/info directory using an absolute pathname? d. which command could you use to change to the /usr/local/share/info directory using a relative pathname? e. which command could you use to change to the /etc directory using an absolute pathname? f. which command could you use to change to the /etc directory using a relative pathname?
Answers: 3
image
Computers and Technology, 22.06.2019 23:50, Emptypockets451
You need to design a circuit that implements the functions in the following table: s0 s1 function0 0 a + 10 1 a – b1 0 a + b1 1 a – 1s0 and s1 are 1-bit control inputs to select the function of the circuit. inputs a and b are 4-bitnumbers in 2s complement form. the output is also a 4-bit number in 2s complement form. you are allowed to use only one ttl 7483 4-bit adder to implement all the functions. but anynumber of other components (except the adder) can be used. hint: design a combinational logic circuit to modify the input b and the “carry input” of theadder depending on the control inputs s0 and s1.important: lab grade will depend on the working of the circuit & will be checked of by your labinstructor.1. is the output valid for the following input combinations: a. s0 = 0, s1 = 0, a = 7, b = 3? b. s0 = 0, s1 = 1, a = 7, b = 3? c. s0 = 1, s1 = 0, a = -4, b = -5? d. s0 = 1, s1 = 1, a = -8, b = 6? 2. what is the range of inputs (for both a and b) that will produce the valid output for all the functions?
Answers: 3
image
Computers and Technology, 23.06.2019 06:00, ashleyd198308
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
image
Computers and Technology, 23.06.2019 12:40, Emilyvite6251
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
You know the right answer?
We have established contact with aliens! write a script that asks for a block of text and determine...

Questions in other subjects:

Konu
Chemistry, 30.08.2021 05:00