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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:30
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 25.06.2019 03:30
What best describes the purpose of occupational safety and health administration
Answers: 1
question
Computers and Technology, 25.06.2019 16:00
|the entire hostname has a maximum of
Answers: 1
You know the right answer?
We have established contact with aliens! write a script that asks for a block of text and determine...
Questions
question
Mathematics, 04.12.2021 01:10
question
Mathematics, 04.12.2021 01:10
question
English, 04.12.2021 01:10
question
Mathematics, 04.12.2021 01:10
question
English, 04.12.2021 01:10
Questions on the website: 13722361