Answers for "[::] python"

2

python

Here is a basic Python function print('Hello')
Posted by: Guest on August-18-2020
7

python .

Python is a programming language.
Nothing more, nothing less.
Posted by: Guest on July-17-2020
2

python

class PrintHello:
  def printnow(self, message):
    self.message = message
    print(message)
 
printer = PrintHello()
printer.printnow("hey")
#completely useless
Posted by: Guest on October-02-2020
4

python

#High-level programming language
Posted by: Guest on September-11-2020
0

python

n = int(input('Type a number, and its factorial will be printed: '))

if n < 0:
    raise ValueError('You must enter a non negative integer')

fact = 1

for i in range(2, n + 1):
    fact *= i

print(fact)
Posted by: Guest on July-16-2020
0

none

>>> # this example show how to retrieve elements of a sequence
>>> "ABCD"[0]
'A'
>>> [0, 1, 2][1]
1
>>> ("ABC", "DEF", "GHI")[1]
'DEF'
Posted by: Guest on January-01-1970

Python Answers by Framework

Browse Popular Code Answers by Language