Answers for "'How to code in Python'"

5

how to code in python

#if its your first time start with this
print("hello world")
#now learn about input
input("whats your name")
#if statements and variables
run = True
if run == True:
  print("hi")
#now lets combine our knowledge
print("Whats your name")
name = input("")
print("Hello, " + name)
Posted by: Guest on May-04-2021
0

python code

# Python 3: Fibonacci series up to n
>>> def fib(n):
>>>     a, b = 0, 1
>>>     while a < n:
>>>         print(a, end=' ')
>>>         a, b = b, a+b
>>>     print()
>>> fib(1000)
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
Posted by: Guest on August-10-2021

Code answers related to "'How to code in Python'"

Python Answers by Framework

Browse Popular Code Answers by Language