Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75144
| Path | csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Marko Rauhamaa <marko@pacujo.net> |
| Newsgroups | comp.lang.python |
| Subject | Re: What is the simplest method to get a vector result? |
| Date | Thu, 24 Jul 2014 17:25:52 +0300 |
| Organization | A noiseless patient Spider |
| Lines | 18 |
| Message-ID | <8761imu93j.fsf@elektro.pacujo.net> (permalink) |
| References | <95524a09-7792-4cec-8c7e-7525a358ee8c@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Info | mx05.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="21360"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ORS4ASTuhciS4IBzaRlKU" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
| Cancel-Lock | sha1:EXvMPzPtf5T7CQDwdDzG3tbIS+8= sha1:mvZARs0wom25Jlp+vwdOA61lWTI= |
| Xref | csiph.com comp.lang.python:75144 |
Show key headers only | View raw
fl <rxjwg98@gmail.com>:
> I have read a lot about Python, but it still has a problem now on a
> simple exercise. For example, I want to generate a sine curve.
Here you go:
========================================================================
#!/usr/bin/env python3
import math
for x in range(0, 361, 15):
print(int((math.sin(x / 180 * math.pi) + 1) * 30 + 0.5) * " " + "*")
========================================================================
Marko
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What is the simplest method to get a vector result? fl <rxjwg98@gmail.com> - 2014-07-24 05:53 -0700
Re: What is the simplest method to get a vector result? Alan <alan.isaac@gmail.com> - 2014-07-24 06:10 -0700
Re: What is the simplest method to get a vector result? Vlastimil Brom <vlastimil.brom@gmail.com> - 2014-07-24 15:49 +0200
Re: What is the simplest method to get a vector result? fl <rxjwg98@gmail.com> - 2014-07-25 16:08 -0700
Re: What is the simplest method to get a vector result? Ian Kelly <ian.g.kelly@gmail.com> - 2014-07-25 18:37 -0600
Re: What is the simplest method to get a vector result? fl <rxjwg98@gmail.com> - 2014-07-25 19:17 -0700
Re: What is the simplest method to get a vector result? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-24 14:06 +0000
Re: What is the simplest method to get a vector result? Marko Rauhamaa <marko@pacujo.net> - 2014-07-24 17:25 +0300
Re: What is the simplest method to get a vector result? fl <rxjwg98@gmail.com> - 2014-07-24 18:29 -0700
Re: What is the simplest method to get a vector result? Ian Kelly <ian.g.kelly@gmail.com> - 2014-07-24 19:50 -0600
Re: What is the simplest method to get a vector result? Dave Angel <davea@davea.name> - 2014-07-24 22:44 -0400
Re: What is the simplest method to get a vector result? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-25 03:23 +0000
csiph-web