Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homework #206

Merged
merged 18 commits into from
Jan 4, 2024
Merged

Homework #206

merged 18 commits into from
Jan 4, 2024

Conversation

ShangTsing
Copy link
Contributor

No description provided.

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

@ShangTsing
一般这种问题是由于没有 update branch 一下你的homework分支,导致有不止一个作业文件在modified状态。 #137 (comment)

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 105
  • Score: 97.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 105
  • Score: 97.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 107
  • Score: 99.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 106
  • Score: 98.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 106
  • Score: 98.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 106
  • Score: 98.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 105
  • Score: 97.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 106
  • Score: 98.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 107
  • Score: 99.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 107
  • Score: 99.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

Pandas homework:

  • Total questions: 12
  • Correct answers: 10
  • Score: 83.00%

修改了10、12题
@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 107
  • Score: 99.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

Pandas homework:

  • Total questions: 12
  • Correct answers: 11
  • Score: 91.00%

修改了第十题
@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 107
  • Score: 99.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

Pandas homework:

  • Total questions: 12
  • Correct answers: 12
  • Score: 100.00%

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 108
  • Score: 100.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

Pandas homework:

  • Total questions: 12
  • Correct answers: 12
  • Score: 100.00%

@ShangTsing
Copy link
Contributor Author

@iphysresearch 老师好,这是我的Python、Numpy 和 Pandas 的基础作业,麻烦记录一下成绩吧,其他作业我会尽量在截止前完成,谢谢老师!

Copy link
Owner

@iphysresearch iphysresearch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShangTsing
很好哈,把Python编程的扩展作业也做一下吧哈?

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 108
  • Score: 100.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

Pandas homework:

  • Total questions: 12
  • Correct answers: 12
  • Score: 100.00%

matplotlib版
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@iphysresearch
Copy link
Owner

Good Job!!! @ShangTsing

Python homework:

  • Total questions: 108
  • Correct answers: 108
  • Score: 100.00%

Numpy homework:

  • Total questions: 10
  • Correct answers: 10
  • Score: 100.00%

Pandas homework:

  • Total questions: 12
  • Correct answers: 12
  • Score: 100.00%

Copy link
Owner

@iphysresearch iphysresearch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShangTsing
完成Python基础作业+Matplotlib数据可视化作业!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matplotlib数据可视化作业!

@iphysresearch iphysresearch merged commit bac917c into iphysresearch:homework Jan 4, 2024
5 checks passed
@ShangTsing
Copy link
Contributor Author

def count_words(text):
    words = text.split()
    return len(words)

# 示例输入
input_text = "Hello, my name is John"

# 调用函数进行统计
word_count = count_words(input_text)

# 输出结果
print(word_count)

@ShangTsing
Copy link
Contributor Author

def checkSegments(s):
    longest_1s = 0
    longest_0s = 0
    current_1s = 0
    current_0s = 0

    for char in s:
        if char == '1':
            current_1s += 1
            current_0s = 0
            longest_1s = max(longest_1s, current_1s)
        else:
            current_0s += 1
            current_1s = 0
            longest_0s = max(longest_0s, current_0s)

    return longest_1s > longest_0s

# Example usage:
s = "1101"
result = checkSegments(s)
print(result)  # Output: True

s = "111000"
result = checkSegments(s)
print(result)  # Output: False

s = "110100010"
result = checkSegments(s)
print(result)  # Output: False

@ShangTsing
Copy link
Contributor Author

`def checkSegment(s):
count = 0

for i in range(1, len(s)):
    if s[i] == '1':
        count += 1
        if count > 1:
            return False
    else:
        count = 0

return True`

@ShangTsing
Copy link
Contributor Author

def findPeakElement(arr):
    left, right = 0, len(arr) - 1

    while left < right:
        mid = left + (right - left) // 2

        if arr[mid] < arr[mid + 1]:
            left = mid + 1
        else:
            right = mid

    return left

@ShangTsing
Copy link
Contributor Author

def findPeakElement(nums):

   #初始化两个数,为输入nums的第一个数与最后一个数的index
    left, right = 0, len(nums) - 1
  #循环,不断取中间值mid 
    while left < right:
        mid = left + (right - left) // 2
  #重新定义left和right知道找到最大值的指标
        if nums[mid] < nums[mid + 1]:
            left = mid + 1
        else:
            right = mid

    return left

@ShangTsing
Copy link
Contributor Author

@iphysresearch 老师这是我的Python拓展作业,机器学习的作业刚刚在工位上还在跑最后一题,回到寝室发现远程软件忘开了😭,其他的作业也没时间做了,今天应该只能交这些作业了,对不起老师。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants