Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
CS3210-Team-Awesome
Project2
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
Project2
/
testExamples.py
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
42 lines (30 loc) · 1.3 KB
main
Breadcrumbs
Project2
/
testExamples.py
Copy path
Top
File metadata and controls
Code
Blame
42 lines (30 loc) · 1.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#1. Check to make sure all the indentation in the input program is used correctly. If not, fix it.
def welcome_student(name):
print(f"Hi, {name}! Welcome to CS3210.") #Indentation error here
def print_pattern(num_rows):
for i in range(num_rows):
for num_cols in range(num_rows-i):
print("*", end="") #Indentation error here
def print_funny():
grade = 90
if grade >= 90: #Indentation error here
print("This is fun bc I got an A") #Indentation error here
#2. Check to make sure all the function headers are syntactically correct. If not, fix it.
def welcome_student(name)
print(f"Hi, {name}! Welcome to CS3210.")
defprint_pattern(num_rows):
for i in range(num_rows):
for num_cols in range(num_rows-i):
print("*", end="")
def print_funny(grade:
if grade >= 90:
print("This is fun bc I got an A")
#3. Count how many time the keyword "print" is used as keywords in the input program.
def welcome_print_easy(name):
print(f"Hello: {name}! Welcome to CS3210.")
print(f"CS3210 is fun.")
print(f"Hello: CS3210 is very easy.")
#the keyword "print" is used as keyword for 3 times
def welcome_print_hard(name):
print(f"Print: {name}! Welcome to CS3210. finished Print")
#the keyword "print" is used as keyword for only 1 time.
You can’t perform that action at this time.