5501_Assignment1_Section1

docx

School

University of North Texas *

*We aren’t endorsed by this school

Course

5707

Subject

Computer Science

Date

Apr 3, 2024

Type

docx

Pages

1

Report

Uploaded by ChancellorCatPerson1091

@) Mail- Jadha. x | @ DocumentCl x Assignment 1 x 5 5501 Assigr 889/notebooks/5501_Assignment1_Sectionl.ipynbi# x & 5501 Assign x how to take * [[ZZZ503 Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions - Please note that updating to Notebook 7 might break some of your extensions. I Postings | - < x Z Jupyter 5501_Assignment1_Section1 Last Checkpoint: 27 minutes ago. (autosaved) File Edit View Inset Cell Kemnel Widgets Help B+ 3 & B 4 % PR B C M Code v e In [ ]: Exercise 13: Fibonacci Numbers In [20]: def gen_fib(): count= int(input("How many fibonacci numbers would you like to generate? ")) i=1 elif count fib elif count > 2: fib = [1,1] while i < (count-1): fib.append(fib[i] + fib[i-1]) ie=1 return fib print(gen_fib()) input() How many fibonacci numbers would you like to generate? 10 1, 1, 2, 3, 5, 8, 13, 21, 34, 55] 5 out[20]: 's5* In [ ]: Exercise 24 : Draw a game board In [52]: def print_horiz_line(): print(" * board_size) 81 Mail - Jadhe x | x | B 5501_Assigr localhost:8889/notebooks/5501. x Trusted & 5501 Assign A oo | Python 3 ipykemel) O x @ howtotake * [[ZZZ503 Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions - Please note that updating to Notebook 7 might break some of your extensions. ' Jupyter 5501_Assignment1_Section1 Last Checkpoint: 29 minutes ago (autosaved) Fle Edt View Inset Cel Kemel Widgets Help B+ 3 @B 4 ¢ PRn B C W Code v e In [ 1: Exercise 24 : Draw a game board In [52]: def print_horiz_line(): print(" * board_size) def print_vert_line(): print("| " = (board_size + 1)) if __name__ main__* board_size = int(input("What size of game board? ")) for index in range(board_size): print_horiz_line() print_vert_line() print_horiz_line() What size of game board? 3 In [ ]: Trusted A oo | Python 3 ipykemel) O x Don't show anymore + Don't show anymore
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help