This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Arrays</title> | |
<style> | |
body { | |
font-family: monospace; | |
margin: 50px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("This program takes a nested array of integer numbers and returns a flat array") | |
print("Press Ctrl+C to exit") | |
try: | |
while True: | |
flat_array = [] | |
nested_array = input("Pleas input your arbitrary array:\n") | |
def loop_through_list(given_list): # this function checks if list items are a list themselves | |
for a in given_list: # and if so, it calls itself within that list item. | |
if type(a) == list: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/python3 | |
print("Press 'Ctrl+C' to exit this tool.") | |
try: | |
while True: | |
print("\nPlease input price in BDT: ") | |
a = raw_input() | |
try: | |
float(a) | |
except ValueError: |
NewerOlder