Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.programming > #45 > unrolled thread
| Started by | Kristjan Robam <robamman2020@hotmail.com> |
|---|---|
| First post | 2020-03-16 06:16 -0700 |
| Last post | 2021-05-08 03:47 -0700 |
| Articles | 4 — 4 participants |
Back to article view | Back to alt.comp.programming
Writing a program, that tells the right answer from "Yes" or "No" to any appropriate question. Kristjan Robam <robamman2020@hotmail.com> - 2020-03-16 06:16 -0700
Re: Writing a program, that tells the right answer from "Yes" or "No" to any appropriate question. he12457@hotmail.com - 2020-08-24 07:25 -0700
Re: Writing a program, that tells the right answer from "Yes" or "No" to any appropriate question. Marc 'BlackJack' Rintsch <marc@rintsch.de> - 2021-05-07 23:04 +0000
Re: Writing a program, that tells the right answer from "Yes" or "No" to any appropriate question. Robam Robam <ya12983@mail.com> - 2021-05-08 03:47 -0700
| From | Kristjan Robam <robamman2020@hotmail.com> |
|---|---|
| Date | 2020-03-16 06:16 -0700 |
| Subject | Writing a program, that tells the right answer from "Yes" or "No" to any appropriate question. |
| Message-ID | <3eb9186c-e0f3-41dd-a1b2-98387d0f2430@googlegroups.com> |
Is this kind of program already made? And is it useable somehow from your own computer ? Kristjan Robam E-mail: r o b a m m a n 2 0 2 0 @ h o t m a i l . c o m
[toc] | [next] | [standalone]
| From | he12457@hotmail.com |
|---|---|
| Date | 2020-08-24 07:25 -0700 |
| Message-ID | <b2c42c19-4505-497b-900a-1ea908ddf66co@googlegroups.com> |
| In reply to | #45 |
esmaspäev, 16. märts 2020 15:16.56 UTC+2 kirjutas Kristjan Robam: > Is this kind of program already made? > And is it useable somehow from your own computer ? > > > > > Kristjan Robam > > E-mail: r o b a m m a n 2 0 2 0 @ h o t m a i l . c o m If someone wants I can make this program. Write to: he12457 @ hot mail . c o m Or call +372 6861327 Kristjan Robam
[toc] | [prev] | [next] | [standalone]
| From | Marc 'BlackJack' Rintsch <marc@rintsch.de> |
|---|---|
| Date | 2021-05-07 23:04 +0000 |
| Message-ID | <s74h1v$lji$1@dont-email.me> |
| In reply to | #45 |
On Mon, 16 Mar 2020 06:16:55 -0700, Kristjan Robam wrote:
> Is this kind of program already made?
Yea sure:
```
#!/usr/bin/env python3
import random
def main():
input("Pleas enter a Y/N question: ")
print("The answer is {}!".format(random.choice(["Yes", "No"])))
if __name__ == "__main__":
main()
```
It's not the best, just about right 50% of the time. ;-)
Ciao,
Marc 'BlackJack' Rintsch
--
countSheep
| sheep |
sheep := 0.
[ self isAsleep ] whileFalse: [ sheep := sheep + 1 ].
^ sheep
[toc] | [prev] | [next] | [standalone]
| From | Robam Robam <ya12983@mail.com> |
|---|---|
| Date | 2021-05-08 03:47 -0700 |
| Message-ID | <7404d085-ed17-4f3b-82f6-4f4bf5801fd7n@googlegroups.com> |
| In reply to | #2914 |
Has to be 100% right.
Robam
Marc 'BlackJack' Rintsch kirjutas laupäev, 8. mai 2021 kl 02:04:32 UTC+3:
> On Mon, 16 Mar 2020 06:16:55 -0700, Kristjan Robam wrote:
>
> > Is this kind of program already made?
> Yea sure:
>
> ```
> #!/usr/bin/env python3
> import random
>
>
> def main():
> input("Pleas enter a Y/N question: ")
> print("The answer is {}!".format(random.choice(["Yes", "No"])))
>
>
> if __name__ == "__main__":
> main()
> ```
>
> It's not the best, just about right 50% of the time. ;-)
>
> Ciao,
> Marc 'BlackJack' Rintsch
> --
> countSheep
> | sheep |
> sheep := 0.
> [ self isAsleep ] whileFalse: [ sheep := sheep + 1 ].
> ^ sheep
[toc] | [prev] | [standalone]
Back to top | Article view | alt.comp.programming
csiph-web