Homework 1 Solutions hw01.zip

Solution files.

You can find the solutions in hw01.py .

Getting Started Videos

These videos may provide some helpful direction for tackling the problems on this assignment.

To see these videos, you should be logged into your berkeley.edu email. YouTube link

Required Questions

Q1: a plus abs b.

Python's operator module contains two-argument functions such as add and sub for Python's built-in arithmetic operators. For example, add(2, 3) evalutes to 5, just like the expression 2 + 3 .

Fill in the blanks in the following function for adding a to the absolute value of b , without calling abs . You may not modify any of the provided code other than the two blanks.

Use Ok to test your code:

Use Ok to run the local syntax checker (which checks that you didn't modify any of the provided code other than the two blanks):

If b is positive, we add the numbers together. If b is negative, we subtract the numbers. Therefore, we choose the operator add or sub based on the sign of b .

Q2: Two of Three

Write a function that takes three positive numbers as arguments and returns the sum of the squares of the two smallest numbers. Use only a single line for the body of the function.

Hint: Consider using the max or min function: >>> max(1, 2, 3) 3 >>> min(-1, -2, -3) -3

Use Ok to run the local syntax checker (which checks that you used only a single line for the body of the function):

We use the fact that if x>y and y>0 , then square(x)>square(y) . So, we can take the min of the sum of squares of all pairs. The min function can take an arbitrary number of arguments.

Alternatively, we can do the sum of squares of all the numbers. Then we pick the largest value, and subtract the square of that.

Q3: Largest Factor

Write a function that takes an integer n that is greater than 1 and returns the largest integer that is smaller than n and evenly divides n .

Hint: To check if b evenly divides a , use the expression a % b == 0 , which can be read as, "the remainder when dividing a by b is 0."

Iterating from n-1 to 1, we return the first integer that evenly divides n . This is guaranteed to be the largest factor of n .

Q4: Hailstone

Douglas Hofstadter's Pulitzer-prize-winning book, Gödel, Escher, Bach , poses the following mathematical puzzle.

  • Pick a positive integer n as the start.
  • If n is even, divide it by 2.
  • If n is odd, multiply it by 3 and add 1.
  • Continue this process until n is 1.

The number n will travel up and down but eventually end at 1 (at least for all numbers that have ever been tried -- nobody has ever proved that the sequence will terminate). Analogously, a hailstone travels up and down in the atmosphere before eventually landing on earth.

This sequence of values of n is often called a Hailstone sequence. Write a function that takes a single argument with formal parameter name n , prints out the hailstone sequence starting at n , and returns the number of steps in the sequence:

Hailstone sequences can get quite long! Try 27. What's the longest you can find?

Note that if n == 1 initially, then the sequence is one step long. Hint: If you see 4.0 but want just 4, try using floor division // instead of regular division / .

Curious about hailstones or hailstone sequences? Take a look at these articles:

  • Check out this article to learn more about how hailstones work!
  • In 2019, there was a major development in understanding how the hailstone conjecture works for most numbers!

We keep track of the current length of the hailstone sequence and the current value of the hailstone sequence. From there, we loop until we hit the end of the sequence, updating the length in each step.

Note: we need to do floor division // to remove decimals.

Check Your Score Locally

You can locally check your score on each question of this assignment by running

This does NOT submit the assignment! When you are satisfied with your score, submit the assignment to Gradescope to receive credit for it.

Submit this assignment by uploading any files you've edited to the appropriate Gradescope assignment. Lab 00 has detailed instructions.

In addition, all students who are not in the mega lab must complete this attendance form . Submit this form each week, whether you attend lab or missed it for a good reason. The attendance form is not required for mega section students.

If you completed all problems correctly, you should see that your score is 6.0 in the autograder output by Gradescope. Each homework assignment counts for 2 points, so in this case you will receive the full 2 points for homework. Remember that every incorrect question costs you 1 point, so a 5.0/6.0 on this assignment will translate to a 1.0/2.0 homework grade for this assignment.

Q1: A Plus Abs B

Fill in the blanks in the following function for adding a to the absolute value of b, without calling abs.

Q2: Two of Three

Write a function that takes three positive numbers and returns the sum of the squares of the two largest numbers. Use only a single line for the body of the function.

Q3: Largest Factor

Write a function that takes an integer n that is greater than 1 and returns the largest integer that is smaller than n and evenly divides n.

Q4: If Function vs Statement

Let’s try to write a function that does the same thing as an if statement.

Despite the doctests above, this function actually does not do the same thing as an if statement in all cases. To prove this fact, write functions c, t, and f such that with_if_statement prints the number 2, but with_if_function prints both 1 and 2.

Remeber that when we call a function, we must evaluate every operand as parameter in the function, so anyway, c function, t function and f function must be called regardless of the return value(True or False) by c function, while in if statement, the true clause can not be called if evaluated value is False. So the two is not exactly the same.

Q5: Hailstone

Douglas Hofstadter’s Pulitzer-prize-winning book, Gödel, Escher, Bach, poses the following mathematical puzzle.

Pick a positive integer n as the start. If n is even, divide it by 2. If n is odd, multiply it by 3 and add 1. Continue this process until n is 1. The number n will travel up and down but eventually end at 1 (at least for all numbers that have ever been tried – nobody has ever proved that the sequence will terminate). Analogously, a hailstone travels up and down in the atmosphere before eventually landing on earth.

This sequence of values of n is often called a Hailstone sequence. Write a function that takes a single argument with formal parameter name n, prints out the hailstone sequence starting at n, and returns the number of steps in the sequence:

Write a one-line program that prints itself, using only the following features of the Python language:

  • Number literals
  • Assignment statements
  • String literals that can be expressed using single or double quotes
  • The arithmetic operators +, -, *, and /
  • The built-in print function
  • The built-in eval function, which evaluates a string as a Python expression
  • The built-in repr function, which returns an expression that evaluates to its argument
  • You can concatenate two strings by adding them together with + and repeat a string by multipying it by an integer.
  • Semicolons can be used to separate multiple statements on the same line. E.g.,

Hint: Explore the relationship between single quotes, double quotes, and the repr function applied to strings.

A program that prints itself is called a Quine. Place your solution in the multi-line string named quine.

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

sgal's solution for CS 61A, Summer 2019, most of which in one line

sgalal/cs61a

Folders and files, repository files navigation.

sgal's solution for CS 61A: Structure and Interpretation of Computer Programs, Summer 2019

  • Labs: 00-06, 08-13
  • Homework: 01-04, 06, 07
  • Hog, Hog revise, Hog Contest
  • Typing Test, Typing Test revise
  • Ants, Ants revise

Not Included:

  • Lab 07: Midterm Review
  • Lab 14: Final Review
  • Homework 00: Survey and Syllabus Quiz
  • Homework 05: Mid-Semester Survey
  • Homework 08: Online Survey, Course Evaluations and Vote for Scheme Art Contest

Not Implemented:

  • Lab 11 and 12 (Optional Problems)
  • Scheme (Extra Credit) and Scheme Contest

Python One-liners

I write a lot of Python one-liners.

Nearly all the Python homework and labs are implemented in one line.

Some problems are required to be solved in one line, like here , here , here (yes, the Y combinator) and here . But why not others?

Why is it possible?

Basic ideas.

Assignment statements can be turned into lambdas.

Function definitions can be turned into lambdas.

If statement can be turned into if expressions.

Two statements can be merged into one.

Y combinator rescues the recursion.

Homework 02

Even the import statement can be one-lined (although I did not do that).

Brain-Storming Ideas

Homework 04

Which could be further one-lined as:

Another Homework 04, using setattr

Which could be one-lined as:

Detailed .gitignore

The original archive contains the code skeleton, the OK autograder and other utilities. The detailed .gitignore files help filter away the unmodified parts.

Why Isn't Scheme Art Implemented?

I tried to do so.

Scheme Error

  • Python 86.8%
  • Haskell 6.4%
  • Scheme 5.9%

CS61A-Spring2022

Homework 1: variables & functions, control.

下载 hw01.zip 。

提交 :完成后,用 python3 ok --submit 提交。你可以在截止日期前多次提交,但只有最后一次提交才会被评分。检查你是否已经在 okpy.org 上成功提交了你的代码。关于提交作业的更多说明,请参见 Lab 0 。

使用 Ok :如果你对使用 Ok 有任何疑问,请参考 本指南 。

阅读资料 :你可能会发现以下参考资料很有用:

重要提示 :1/24星期一的讲座将涉及阅读 1.3-1.5 ,其中包含问题 2 和 5 所需的材料。

评分 :家庭作业是根据正确性来评分的。每一个错误的问题将使总分减少一分。如教学大纲中所述,有一个家庭作业政策。这个家庭作业满分为 2 分。

Welcome Forms

Q1: welcome forms.

请填写 “课程大纲测验” ,该测验是根据课程大纲上的 政策 制定的,同时也是可选的 “欢迎调查” 。

要解决这些问题,请打开 Parsons 编辑器:

Q2: k in Num

写一个函数 k_in_num ,它接收两个整型参数, k 和 num 。如果 num 含有数字 k , k_in_num 返回 True ,如果 num 不含有数字 k ,返回 False 。

Q3: A Plus Abs B

Python 的 operator 模块为 Python 内在的算术运算符定义了二进制函数。例如,调用 operator.add(2,3) 等同于调用表达式 2+3 ;两者都将返回 5 。

在下面的函数中填空, a 加 b 的绝对值,而不调用 abs 。除了这两个空格外,你 不得 修改所提供的任何代码。

用 Ok 来测试你的代码:

Q4: Two of Three

编写一个以三个 正数 为参数并返回两个最小数的平方之和的函数。 函数的主体只用一行。

提示 :考虑使用 max 或 min 函数: >>> max ( 1 , 2 , 3 ) 3 >>> min ( - 1 , - 2 , - 3 ) - 3

Q5: Largest Factor

编写一个函数,接收一个 大于 1 的整数 n ,并返回小于 n 的最大整数,并且该数能被 n 整除。

提示 :要检查 b 是否被 a 整除,可以使用表达式 a % b == 0 ,可以读作:“a除以b的余数是0”。

635th Anti-Aircraft Missile Regiment

635-й зенитно-ракетный полк

Military Unit: 86646

Activated 1953 in Stepanshchino, Moscow Oblast - initially as the 1945th Anti-Aircraft Artillery Regiment for Special Use and from 1955 as the 635th Anti-Aircraft Missile Regiment for Special Use.

1953 to 1984 equipped with 60 S-25 (SA-1) launchers:

  • Launch area: 55 15 43N, 38 32 13E (US designation: Moscow SAM site E14-1)
  • Support area: 55 16 50N, 38 32 28E
  • Guidance area: 55 16 31N, 38 30 38E

1984 converted to the S-300PT (SA-10) with three independent battalions:

  • 1st independent Anti-Aircraft Missile Battalion (Bessonovo, Moscow Oblast) - 55 09 34N, 38 22 26E
  • 2nd independent Anti-Aircraft Missile Battalion and HQ (Stepanshchino, Moscow Oblast) - 55 15 31N, 38 32 23E
  • 3rd independent Anti-Aircraft Missile Battalion (Shcherbovo, Moscow Oblast) - 55 22 32N, 38 43 33E

Disbanded 1.5.98.

Subordination:

  • 1st Special Air Defence Corps , 1953 - 1.6.88
  • 86th Air Defence Division , 1.6.88 - 1.10.94
  • 86th Air Defence Brigade , 1.10.94 - 1.10.95
  • 86th Air Defence Division , 1.10.95 - 1.5.98

Top.Mail.Ru

Current time by city

For example, New York

Current time by country

For example, Japan

Time difference

For example, London

For example, Dubai

Coordinates

For example, Hong Kong

For example, Delhi

For example, Sydney

Geographic coordinates of Elektrostal, Moscow Oblast, Russia

City coordinates

Coordinates of Elektrostal in decimal degrees

Coordinates of elektrostal in degrees and decimal minutes, utm coordinates of elektrostal, geographic coordinate systems.

WGS 84 coordinate reference system is the latest revision of the World Geodetic System, which is used in mapping and navigation, including GPS satellite navigation system (the Global Positioning System).

Geographic coordinates (latitude and longitude) define a position on the Earth’s surface. Coordinates are angular units. The canonical form of latitude and longitude representation uses degrees (°), minutes (′), and seconds (″). GPS systems widely use coordinates in degrees and decimal minutes, or in decimal degrees.

Latitude varies from −90° to 90°. The latitude of the Equator is 0°; the latitude of the South Pole is −90°; the latitude of the North Pole is 90°. Positive latitude values correspond to the geographic locations north of the Equator (abbrev. N). Negative latitude values correspond to the geographic locations south of the Equator (abbrev. S).

Longitude is counted from the prime meridian ( IERS Reference Meridian for WGS 84) and varies from −180° to 180°. Positive longitude values correspond to the geographic locations east of the prime meridian (abbrev. E). Negative longitude values correspond to the geographic locations west of the prime meridian (abbrev. W).

UTM or Universal Transverse Mercator coordinate system divides the Earth’s surface into 60 longitudinal zones. The coordinates of a location within each zone are defined as a planar coordinate pair related to the intersection of the equator and the zone’s central meridian, and measured in meters.

Elevation above sea level is a measure of a geographic location’s height. We are using the global digital elevation model GTOPO30 .

Elektrostal , Moscow Oblast, Russia

Killer.Cloud the Serial Killer Database

Serial Killer Quick Reference Guides

Serial Killer Stranglers by: Kevin Smith ISBN10: 1733630600

#1 Stranglers

  • Killer.Cloud
  • Serial Killers
  • Necrophiliacs

Sergei Ryakhovsky

The balashikha ripper, the hippopotamus,   active for 6 years (1988-1993) in russia, confirmed victims, possible victims.

  • Serial Killer Profile
  • Serial Killer Type
  • General Information
  • Characteristics
  • Cognitive Ability
  • Incarceration
  • 8 Timeline Events
  • Serial Killers Active During Spree
  • Boolean Statistical Questions
  • 12 Books Written About Sergei Ryakhovsky
  • 3 External References

Internal References

Sergei Ryakhovsky (Sergei Vasilyevich Ryakhovsky) a Soviet-Russian serial killer known as the Balashikha Ripper and The Hippopotamus. Ryakhovsky was convicted for the killing of nineteen people in the Moscow area between 1988 and 1993. Ryakhovsky's mainly stabbed or strangulated his victims, he mutilated some bodies, mainly in the genital area. Allegedly Ryakhovsky carried out necrophilic acts on his victims and stole their belongings. Ryakhovsky standing 6’5" tall and weighting 286 pounds, gaining him the nickname, The Hippo. Sergei Ryakhovsky died on January 21st 2005 from untreated tuberculosis while serving his life sentence in prison.

Sergei Ryakhovsky Serial Killer Profile

Serial Killer Sergei Ryakhovsky (aka) the Balashikha Ripper, The Hippopotamus, was active for 6 years between 1988-1993 , known to have ( 19 confirmed / 19 possible ) victims. This serial killer was active in the following countries: Russia

Sergei Ryakhovsky was born on December 29th 1962 in Balashikha, Moscow Oblast, Soviet Union. He had a physically defect. During his education he had academic, social or discipline problems including being teased or picked on.

Sergei Ryakhovsky a necrophile male citizen of Russia.

Prior to his spree he had killed, commited crimes, and served time in jail.

In 1988 (Age 25/26) Sergei Ryakhovsky started his killing spree, during his crimes as a serial killer he was known to rob, commit acts of necrophilia , torture , strangle , rape , mutilate, and murder his victims.

He was arrested on April 13th 1993 (Age 30), sentenced to death by firing squad at a maximum-security penal colony in Solikamsk, Perm Oblast, Russia. He was convicted on charges of murder and other possible charges during his lifetime.

Sergei Ryakhovsky died on January 21st 2005 (Age 42), cause of death: natural causes, untreated tuberculosis at a maximum-security penal colony in Solikamsk, Perm Oblast, Russia.

Profile Completeness: 62%

Sergei Ryakhovsky has been listed on Killer.Cloud since November of 2016 and was last updated 4 years ago.

Sergei Ryakhovsky a known:

( 651 killers ) serial killer.

The unlawful killing of two or more victims by the same offender(s), in separate events. Serial Killer as defined by the FBI at the 2005 symposium.

( 308 killers ) RAPIST

Rape is usually defined as having sexual intercourse with a person who does not want to, or cannot consent.

( 60 killers ) NECROPHILIAC

Necrophilia, also called thanatophilia, is a sexual attraction or sexual act involving corpses. Serial Killer Necrophiliacs have been known to have sex with the body of their victim(s).

( 89 killers ) TORTURER

Torture is when someone puts another person in pain. This pain may be physical or psychological. Tourturers touture their victims.

( 251 killers ) STRANGLER

Strangulation is death by compressing the neck until the supply of oxygen is cut off. Stranglers kill by Strangulation.

Sergei Ryakhovsky Serial Killer Profile:

Updated: 2019-06-30 collected by killer.cloud, 8 timeline events of serial killer sergei ryakhovsky.

The 8 dates listed below represent a timeline of the life and crimes of serial killer Sergei Ryakhovsky. A complete collection of serial killer events can be found on our Serial Killer Timeline .

Back to top Serial Killers Active During

The following serial killers were active during the same time span as Sergei Ryakhovsky (1988-1993).

Jack Harold Jones 2 Victims during 13 Years

Gao chengyong 11 victims during 15 years, michael lee lockhart 3 victims during 2 years, pedro lopez 110 victims during 34 years, serial killers by active year, books that mention sergei ryakhovsky.

Book: Serial Killer Stranglers (mentions serial killer Sergei Ryakhovsky)

Kevin Smith

Serial killer stranglers.

Book: Serial Killer Rapists (mentions serial killer Sergei Ryakhovsky)

Serial Killer Rapists

Book: Butterfly Skin (mentions serial killer Sergei Ryakhovsky)

Sergey Kuznetsov

Butterfly skin.

Book: Believing in Russia (mentions serial killer Sergei Ryakhovsky)

Geraldine Fagan

Believing in russia.

Book: Freedom of Religion Or Belief. Anti... (mentions serial killer Sergei Ryakhovsky)

Danny Schäfer

Freedom of religion or belief. anti-sect move....

Book: 100 of the Most Famous Serial Kille... (mentions serial killer Sergei Ryakhovsky)

100 of the Most Famous Serial Killers of All...

Book: The New International Dictionary of... (mentions serial killer Sergei Ryakhovsky)

Stanley M. Burgess

The new international dictionary of pentecost....

Book: Global Renewal Christianity (mentions serial killer Sergei Ryakhovsky)

External References

  • Sergei Ryakhovsky on en.wikipedia.org , Retrieved on Sep 18, 2018 .
  • Juan Ignacio Blanco , Sergei Vasilyevich RYAKHOVSKY on murderpedia.org , Retrieved on Sep 18, 2018 .
  • Q372816 on www.wikidata.org , Retrieved on Oct 9, 2018 .

Sergei Ryakhovsky is included in the following pages on Killer.Cloud the Serial Killer Database

  • #3 of 45[ Page 1 ] of Serial Killers with birthdays in December
  • #10 of 60[ Page 1 ] of Serial Killer Necrophiliacs sorted by Confirmed Victims
  • #10 of 29[ Page 1 ] of Serial Killers active in Russia
  • #10 of 55[ Page 1 ] of Capricorn Serial Killers sorted by Confirmed Victims
  • #11 of 89[ Page 1 ] of Serial Killer Torturers sorted by Confirmed Victims
  • #27 of 250[ Page 2 ] of Serial Killer Stranglers sorted by Confirmed Victims
  • #35 of 307[ Page 3 ] of Serial Killer Rapist sorted by Confirmed Victims
  • #63 of 651[ Page 5 ] of serial killers sorted by Confirmed Victims
  • #264 of 651[ Page 18 ] of serial killers sorted by Years Active
  • #381 of 651[ Page 26 ] of serial killers sorted by Profile Completeness
  • #516 of 651[ Page 35 ] of the A-Z List of Serial Killers

COMMENTS

  1. Homework 1 Solutions

    Homework 1 Solutions hw01.zip; Solution Files. You can find the solutions in hw01.py. Getting Started Videos Getting Started Videos. These videos may provide some helpful direction for tackling the problems on this assignment. ... Each homework assignment counts for 2 points, so in this case you will receive the full 2 points for homework ...

  2. Homework 1 Solution

    The course of UCB CS 61A. def k_in_num (k, num): """ Complete k_in_num, a function which returns True if num has the digit k and returns False if num does not have the digit k. 0 is considered to have no digits. >>> k_in_num(3, 123) # .Case 1 True >>> k_in_num(2, 123) # .Case 2 True >>> k_in_num(5, 123) # .Case 3 False >>> k_in_num(0, 0) # .Case 4 False """ "*** YOUR CODE HERE ***" while num ...

  3. GitHub

    UCB CS61A fall 2020 Solutions for All Discussions, Labs, Projects, and Homeworks - FyisFe/UCB-CS61A-20Fall ... Homework. Hw01; Hw02; Hw03; Hw04; Hw05; Hw06; Hw07; Hw08; Hw09; Project. Hog; Cats; Ants; Scheme; Acknowledgements. Really appreciate being able to tag along and study this course, it is very kind of them to make this available for ...

  4. cs61a/homework/hw1.py at master · kfei/cs61a · GitHub

    hw1.py. Cannot retrieve latest commit at this time. History. Code. 110 lines (93 loc) · 1.92 KB. # CS 61A Fall 2014 # Name: kfei # Login: from operator import add, sub def a_plus_abs_b (a, b): """Return a+abs (b), but without calling abs. >>> a_plus_abs_b (2, 3) 5 >>> a_plus_abs_b (2, -3) 5 """ if b < 0: f = sub else: f = add return f (a, b ...

  5. cs61a-hw01

    cs61a-hw01. Posted on2018-08-24Edited on2022-02-07InCS61A. Q1: A Plus Abs B. Fill in the blanks in the following function for adding a to the absolute value of b, without calling abs. 1.

  6. Extra Homework 1 Solutions

    Extra Homework 1 Solutions extra01.zip; Solutions: You can find the file with solutions for all questions here. Newton's Method Q1: Intersect. Implement intersect, which takes two functions f and g and their derivatives df and dg.It returns an intersection point x, at which f(x) is equal to g(x).. def intersect(f, df, g, dg): """Return where f with derivative df intersects g with derivative dg.

  7. Homework 1

    merger: a two-argument function that specifies how the current term is merged with the previously accumulated terms. base: value at which to start the accumulation. For example, the result of accumulate(add, 11, 3, square) is. 11 + square(1) + square(2) + square(3) = 25. You may assume that merger is commutative.

  8. Homework 1

    Each homework assignment counts for 2 points, so in this case you will receive the full 2 points for homework. Remember that every incorrect question costs you 1 point, so a 5.0/6.0 on this assignment will translate to a 1.0/2.0 homework grade for this assignment. CS 61A: Structure and Interpretation of Computer Programs.

  9. Cs61a Homework 1 Solutions

    Cs61a Homework 1 Solutions - Free download as PDF File (.pdf), Text File (.txt) or read online for free.

  10. CS 61A: Homework 1

    CS61A: Structure and Interpretation of Computer Programs. CS 61A: Homework 1. Due by 11:59pm on Wednesday, 1/28. Instructions. Download hw01.zip.Inside the archive, you will find a file called hw01.py, along with a copy of the OK autograder.. Submission: When you are done, submit with python3 ok --submit.You may submit more than once before the deadline; only the final submission will be scored.

  11. GitHub

    sgal's solution for CS 61A, Summer 2019, most of which in one line - sgalal/cs61a. sgal's solution for CS 61A, Summer 2019, most of which in one line - sgalal/cs61a. Skip to content. ... Homework 08: Online Survey, Course Evaluations and Vote for Scheme Art Contest; Not Implemented:

  12. Homework 1 Solutions CS 61A Fall 2021.pdf

    View Homework 1 Solutions _ CS 61A Fall 2021.pdf from CS 61A at Ohlone College. 9/8/2021 Homework 1 Solutions | CS 61A Fall 2021 Homework 1 Solutions hw01.zip (hw01.zip) Solution Files You can find

  13. Cs61a Homework Solutions

    Cs61a Homework Solutions - Free download as PDF File (.pdf), Text File (.txt) or read online for free.

  14. CS61A HW1 Solutions

    View Homework Help - CS61A HW1 Solutions from COMPSCI 61B at University of California, Berkeley. Homework 1 Solutions Solution Files You can find the solutions in the hw01.py (problems/hw01.py) and

  15. CS 61A : 61A

    10/2/23, 11:59 AM Homework 1 Solutions | CS 61A Fall 2023 Homework 1 Solutions hw01.zip (hw01.zip) Solution Files You can find the solutions in hw01.py (hw01.py). Required Questions Q1: A Plus Abs B Python's operator module defines binary functions for Py ... 2022 1 CS61A S MALL G ROUP T UTORING S ECTIONS 7: T REES AND L INKED L ISTS Page 2 1 ...

  16. Homework 1: Variables & Functions, Control

    Homework 1: Variables & Functions, Control 说明. 下载 hw01.zip 。 提交:完成后,用 python3 ok --submit 提交。你可以在截止日期前多次提交,但只有最后一次提交才会被评分。检查你是否已经在 okpy.org 上成功提交了你的代码。关于提交作业的更多说明,请参见 Lab 0 。

  17. Homework 1

    Section 1.2; Section 1.3; Section 1.4; Section 1.5; Important: Some of these readings necessary for the homework questions will not be covered until Monday's lecture on Control. Grading: Homework is graded based on correctness. Each incorrect problem will decrease the total score by one point. There is a homework recovery policy as stated in ...

  18. 635th Anti-Aircraft Missile Regiment

    Launch area: 55 15 43N, 38 32 13E (US designation: Moscow SAM site E14-1) Support area: 55 16 50N, 38 32 28E; Guidance area: 55 16 31N, 38 30 38E; 1984 converted to the S-300PT (SA-10) with three independent battalions: 1st independent Anti-Aircraft Missile Battalion (Bessonovo, Moscow Oblast) - 55 09 34N, 38 22 26E;

  19. Geographic coordinates of Elektrostal, Moscow Oblast, Russia

    Geographic coordinates of Elektrostal, Moscow Oblast, Russia in WGS 84 coordinate system which is a standard in cartography, geodesy, and navigation, including Global Positioning System (GPS). Latitude of Elektrostal, longitude of Elektrostal, elevation above sea level of Elektrostal.

  20. Homework 1

    Q3: Two of Three. Write a function that takes three positive numbers and returns the sum of the squares of the two smallest numbers. Use only a single line for the body of the function. def two_of_three(x, y, z): """Return a*a + b*b, where a and b are the two smallest members of the. positive numbers x, y, and z. >>> two_of_three(1, 2, 3)

  21. Elektrostal

    Law #130/2004-OZ of October 25, 2004 On the Status and the Border of Elektrostal Urban Okrug, as amended by the Law #82/2010-OZ of July 1, 2010 On Amending the Law of Moscow Oblast "On the Status and the Border of Elektrostal Urban Okrug" and the Law of Moscow Oblast "On the Status and Borders of Noginsky Municipal District and the Newly ...

  22. Sergei Ryakhovsky

    Sergei Ryakhovsky (Sergei Vasilyevich Ryakhovsky) a Soviet-Russian serial killer known as the Balashikha Ripper and The Hippopotamus. Ryakhovsky was convicted for the killing of nineteen people in the Moscow area between 1988 and 1993. Ryakhovsky's mainly stabbed or strangulated his victims, he mutilated some bodies, mainly in the genital area.