Thanks to Anaconda and other giants for this amazing possibility - Python in the browser!
Temporarily disabled PyScript for improvement.
You ca still use Python here
-
- Active Topics
-
-
- by Eli 21 hours ago Re: What is in Your Mind? View the latest post Replies 703 Views 299974
- by Eli 21 hours ago Russia Invades Ukraine View the latest post Replies 663 Views 235151
- by Eli 2 days ago All in One: YouTube, TED, X, Facebook and Instagram Reels, Videos, Images and Text Posts View the latest post Replies 326 Views 34171
- by Eli 3 days ago PySpark for Large Data Processing View the latest post Replies 1 Views 6865
- by Eli 1 week ago President Museveni's Speech During International Development Association (IDA) Summit View the latest post Replies 1 Views 280
- by Eli 1 week ago From Simple Linear Regression Analysis to Covariance & Correlation to Independent Determinant, and R-Squared View the latest post Replies 11 Views 24839
- by Eli 1 week ago Collection of Greatest Christian Hymns of all Times View the latest post Replies 34 Views 67356
- by Eli 1 week ago Pondering Big Cosmology Questions Through Lectures and Dialogues View the latest post Replies 34 Views 58081
- by Eli 1 week ago Programmatically Manipulate Files: Renaming, Reading, Writing, Deleting, and Moving Files Between Folders View the latest post Replies 7 Views 15755
- by Eli 2 weeks ago Iran Launches Retaliatory Attack Against Israel, and Israel Retaliates by Attacking Iranian Isfahan Millitary Base View the latest post Replies 28 Views 17776
-
PyScript: Python in the Browser
- Eli
- Senior Expert Member
- Reactions: 183
- Posts: 5382
- Joined: 9 years ago
- Location: Tanzania
- Has thanked: 75 times
- Been thanked: 88 times
- Contact:
Test These examples
Given the list of integers, X, write code to count how many integers are strictly larger than all the integers to their right. Exclude the last digit since it doesn’t have a number to its right. E.g. for [2,3,1] the answer should be 1 while for [12,4,4,2,2,3] the answer is 2.
In Python the code may look like (Use other languages):
Given the list of integers, X, write code to count how many integers are strictly larger than all the integers to their right. Exclude the last digit since it doesn’t have a number to its right. E.g. for [2,3,1] the answer should be 1 while for [12,4,4,2,2,3] the answer is 2.
In Python the code may look like (Use other languages):
- X = [7,9,5,3,2,4,5,0]
- def current_max(X):
- m = 0
- for i in X[::-1]:
- m = max(m, i)
- yield m
- N_int = sum([x>y for x,y in zip(X[-2::-1], current_max(X))])
- print(N_int)
- import matplotlib.pyplot as plt
- x = [7,9,5,3,2,4,5,0]
- y = [7,9,5,3,2,4,5,0]
- fig, ax = plt.subplots()
- ax.scatter(x, y)
- fig
0
TSSFL -- A Creative Journey Towards Infinite Possibilities!
-
- Similar Topics
- Replies
- Views
- Last post
-
- Information
-
Who is online
Users browsing this forum: No registered users and 0 guests