AI Generated image of a woman recording findings while listening to a ham-style-like device. Image created by ChatGPT, likely using the Dall-E3 GPT.
Scientists believe that Sasquatch is somehow communicating through radio waves, but the signal only transmits sporadically and is not always stable enough to be decoded. They need your help to detect when the signal is strong enough to be stable.
Write a program that simulates Sasquatch’s signal search. Generate a random number between 1 and 10 to represent the signal strength each time the loop runs. The loop should keep running until the signal strength is between 7 and 10 (representing a stable signal). Each time the signal is not stable, print a message like “Still searching…” and the current signal strength. Once a stable signal is found, stop searching.
Signal strength: 3 - Still searching…
Signal strength: 5 - Still searching…
Signal strength: 8 - Stable signal found!
Consider changing the prompt to move away from random # generation and towards one of the following:
User Input
File Reading
String Reading
Collection Reading (Array, ArrayList, Linked List, etc.)
Consider changing the inputs from 1-10 to 0-9 to make parsing easier (unless the values are delimiter separated - space, comma, new line, etc.)
User would still read each value and print "still searching..." until a stable signal is found, then they'd stop reading the remaining data.