In B4Coder you build a program from flowchart blocks, run it step by step, then press View Code to see it as Python. Change the flowchart and the Python changes with it.
Python is the language most schools and colleges start with: short, readable, with no brackets or semicolons to get wrong. Indentation shows which lines belong inside an if or a loop, just as a flowchart's arrows do.
About the code B4Coder writes: Python 3. Dividing always gives a decimal, so 6 / 2 shows as 3.0.
The most common blocks, and the Python they turn into. View Code uses your own names and values.
age = int(input("How old are you? "))print("Hello, " + name)total = 0
if age >= 18:
...
else:
...for _ in range(10):
...while total < 100:
...Each one is a flowchart in B4Coder. This is the Python it turns into, exactly as View Code writes it.
Ask for two numbers and show the sum.
a = float(input("What is the first number? "))b = float(input("What is the second number? "))sum = a + bprint("The sum is " + str(sum))Check whether a number is even or odd.
number = int(input("Enter a number "))if number % 2 == 0: print("It is an Even number")else: print("It is an Odd number")Use a repeat loop to count from 1 to 10.
count = 1for _ in range(10): print("Count: " + str(count)) count = count + 1Build a flowchart, press Run to watch it work, then open View Code and pick Python. It's free, with no install.
Open the editor