Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ejemplo2_python_20.068.214-9
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
#BastianMarinGarcia #20.068.214-9 import math while True: a = int(input()) if 1 <= a and a <= 50: break else: continue while True: S = float(input()) if -10 <= S and S <= 10: break else: continue ome = 0.0 con = 0 while ( con != a): ome += (((-1)**con)*(S**(con *3)))/math.factorial(con*3) con += 1 print("OMEGA (", S, ") para ", a , " Termino(s) = ", ome)
0 -1 1000 3 50.0 -50 -100 1.0
[
-
]
Show input
Absolute running time: 0.17 sec, cpu time: 0.03 sec, memory peak: 8 Mb, absolute service time: 0,33 sec
edit mode
|
history
|
discussion
OMEGA ( 1.0 ) para 3 Termino(s) = 0.8347222222222223