CIS 6 :: Lab 02 - Syntax/Semantics
CIS6作业代写 1. Identify the parts of the chaos program as follows: Color code each: identifier, expression, statement, reserved words.
Task 1: Definitions & Concepts
Instructions: Answer the questions below. Press [Shift + Enter] after each question to answer. CIS6作业代写
1. Why is it a good idea to first write out an algorithm in pseudocode rather than jumping immediately to Python code?
- Programming Elements:
a. Write three names that are legal identifiers:
b. Write three names that are illegal identifies:
c. Write three name that are legal identifiers but not good practices: CIS6作业代写
- Expressions:
a. What is an expressions:
b. Write an example expression:
- Syntax vs. Convention:
- Use the table below to list three syntax rule examples and three good programming practices (conventions)
- Apply six steps in the software development process to the below program Problem: Write a program that asks users to enter a US Dollar amount and converts it to Euros and outputs the result
Task 2: Understanding Programming CIS6作业代写
- Identify the parts of the chaos program as follows: Color code each: identifier, expression, statement, reserved words.
# File: chaos.py
# A simple program illustrating chaotic behavior.
def main():
print("This program illustrates a chaotic function")
x = eval(input("Enter a number between 0 and 1: "))
for i in range(10):
x = 3.9 * x * (1 - x)
print(x)
main()
- Show the output from the following fragments (you can write your output in a single line separated by a space): CIS6作业代写
a. for i in range(5):
print(i * i)
=>
b. for d in [3,1,4,1,5]:
print(d, end=" ")
=>
商科代写 cs代写 法律学代写 经济学代考_经济学作业代写 艺术代写 心理学代写 哲学代写 伦理学代写 体育学代写 化学代写 教育学代写 医学代写 历史代写
发表回复
要发表评论,您必须先登录。